Salamander: AWS Spot Instances made easy

I replicated this problem on my linux laptop (commenting out cuda90 and cudnn to save time, and pytorch and torchvision because the older gpu is no longer supported).

The culprit seems to be jupyter_contrib_nbextensions.

I began by commenting out everything in environment.yml except for line 38:

- conda-forge::jupyter_contrib_nbextensions

a fastai environment consisting only of that package installed, but with some strange (all-OK) messages in the execution phase.

I then uncommented everything (except for 4 packages listed at top) and ran conda env update. The result was the exact same error.

Oddly enough, when I then try to delete the environment, I get an error and 5 warnings, the error being:

+ /home/wnixalo/miniconda3/envs/fastai/bin/jupyter-contrib-nbextension uninstall --sys-prefix
...
...
  File "/home/wnixalo/miniconda3/envs/fastai/lib/python3.6/site-packages/notebook/nbextensions.py", line 28, in <module>
    from ipython_genutils.py3compat import string_types, cast_unicode_py2
ModuleNoteFoundError: No module named 'ipython_genutils.py3compat'

and the last warning:

WARNING conda.core.link:run_script(516): pre-unlink script failed for package conda-forge::widgetsnbextension-3.4.2-py36_0
consider notifying the package maintainer

(rewritten by hand if there’re any typos)

I’m going to see what happens if fastai is installed without jupyter&all, with jupyter&all installed manually afterwards. I’m surprised I haven’t seen this anywhere: I replicated this on 3 seperate machines, and the environment file is over a month old now.


Update:

It works.

  1. From an updated fastai repo, in environment.yml comment out lines 34-38 (jupyter, jupyter_client, jupyter_console, jupyter_core, conda-forge::jupyter_contrib_nbextensions).
  2. run conda env update (not having any environment activated, and having no pre-existing fastai environment).
    2a. I also conda/pip installed any environments that weren’t installed due to some conflict (mkl-random needs cython; spacy; twisted)
  3. One by one conda install: jupyter, _client, and _core; the last two’ll probably already be installed by jupyter.
  4. conda install -c conda-forge jupyter_contrib_nbextensions (yes to all)

And it should work. I haven’t tested it during runtime yet. If the above works on a cloud machine I’ll update.


Update2:

It works on salamander’s AWS spot instance.