docker-python: Fast Ai not working from kaggle
hi vincent i still face the same issue,
i know it was upgraded but i think it must have been days back…
Yesterday IST night time,suddenly i start getting module not found errors
like say 8pm i was working with it so it got loaded in RAM ,at 11pm when i
did commit to my code,i started getting this error and continue to get the
same.
kindly look into this urgently my work is stuck
"Previous quote "
Fastai was upgraded from 0.7.x to 1.0.x in the latest release. I confirmed that I can call fastai from a Kaggle Kernel.
Please reopen this issue if you are still having trouble with the fastai library on Kaggle Kernels.
Thank you
_Originally posted by @rosbo in https://github.com/Kaggle/docker-python/pull/338#issuecomment-429448539_
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 30 (8 by maintainers)
Thanks for your user feedback. We’re actively working on fixing this issue, but this is related to the core of Jupyter Notebook, so it takes time and efforts to fix it.
The main issue here is that Juputer Notebook Kernel preloads
torchand it caches it indefinitely. So no matter what you do with it, the Notebook session keeps using it.Therefore, a workaround to this problem is to restart the Jupyter Notebook Kernel after installing the libraries (Note that this workaround is not working for committing a Kaggle Kernel (due to the lack of chance to restart a Jupyter Kernel instance):
Ctrl+shift+p and select “confirm restart kernel” This will restart the Jupyter Kernel instance and reload the installed libraries.
Wait until the Jupyter Kernel finishes the restart
import fastai shows the correct version.
I’m working on fixing this issue fundamentally for Kaggle Kernels, and update this thread with any progress.
Thanks!
Is it possible to add fastai v1 as the default version instead of 0.7? It’s the version fastai community is actively developing and maintaining. The current competition https://www.kaggle.com/c/quora-insincere-questions-classification simply doesn’t allow Internet connection, which means we can not pip install fastai v1 and pytorch 1.0 even if the package reloading after pip install issue gets fixed. fastai 0.7 just doesn’t work with pytorch 0.4.1 for NLP tasks, as the embedding part in fit() will throw out NotImplementedError
We are working on a solution to make sure the pip install command will work as you would expect. Stay tuned.
@miwojc Like my comment here, this used to “work” because the kernel would error and restart automatically forcing a reload of the libraries. The kernel has since stabilized and that hardly happens anymore. You’ll have to wait for Kaggle to officially start supporting multiple versions of libraries (e.g. Pytorch, fastai).
Once implemented, that solution should work on both GPU and CPU sessions.
@diskshima thanks for the confirmation. I’ll probably just wait. Otherwise I’ll spend more time hacking around dependencies than actually doing ML.