Fastai in Databricks

Hi everyone.

Wanted to know if anyone can share their experience setting up fastai library in Databricks. Currently I’m trying to run fastai 0.7 and am encountering the following error.

ImportError                               Traceback (most recent call last)
<command-181012> in <module>()
----> 1 from fastai.imports import *
      2 from fastai.torch_imports import *
      3 from fastai.structured import *
      5 from sklearn_pandas import DataFrameMapper

/databricks/python/lib/python3.5/site-packages/fastai/ in <module>()
     22 from matplotlib import pyplot as plt, rcParams, animation
---> 23 from ipywidgets import interact, interactive, fixed, widgets
     24 matplotlib.rc('animation', html='html5')
     25 np.set_printoptions(precision=5, linewidth=110, suppress=True)

/databricks/python/lib/python3.5/site-packages/ipywidgets/ in <module>()
     23 from IPython import get_ipython
     24 from ._version import version_info, __version__, __protocol_version__, __jupyter_widgets_controls_version__, __jupyter_widgets_base_version__
---> 25 from .widgets import *
     26 from traitlets import link, dlink

/databricks/python/lib/python3.5/site-packages/ipywidgets/widgets/ in <module>()
      2 # Distributed under the terms of the Modified BSD License.
----> 4 from .widget import Widget, CallbackDispatcher, register, widget_serialization
      5 from .domwidget import DOMWidget
      6 from .valuewidget import ValueWidget

/databricks/python/lib/python3.5/site-packages/ipywidgets/widgets/ in <module>()
     14 from IPython.core.getipython import get_ipython
---> 15 from ipykernel.comm import Comm
     16 from traitlets.utils.importstring import import_item
     17 from traitlets import (

/databricks/python/lib/python3.5/site-packages/ipykernel/ in <module>()
      1 from ._version import version_info, __version__, kernel_protocol_version_info, kernel_protocol_version
----> 2 from .connect import *

/databricks/python/lib/python3.5/site-packages/ipykernel/ in <module>()
     13 from IPython.core.profiledir import ProfileDir
---> 14 from IPython.paths import get_ipython_dir
     15 from ipython_genutils.path import filefind
     16 from ipython_genutils.py3compat import str_to_bytes, PY3

/databricks/python/lib/python3.5/site-packages/IPython/ in <module>()
      8 import IPython
      9 from IPython.utils.importstring import import_item
---> 10 from IPython.utils.path import (
     11     get_home_dir, get_xdg_dir, get_xdg_cache_dir, compress_user, _writable_dir,
     12     ensure_dir_exists, fs_encoding)

ImportError: cannot import name 'ensure_dir_exists'

This is not a fastai problem, but a general jupyter one. see this:

not sure you can change that in databricks?

@hafidz did you figure out how to run on Databricks? I want to do the same soon.

unfortunately i wasn’t able to get it working. had to run it in EC2 instead to get my use case working.