Does anyone know how to engage autoreload functionality while using importnb package?
Autoreload is the automatic reloading of imported content when that content is altered. This functionality is available in Jupyter. For example, to use autoreload in Jupyter, enter the following in a Jupyter cell:
When content in abc.py is changed, abc is re-imported and the changes are effected in the Jupyter notebook.
I understand that importnb is compatible with importlib's reload (see README). Disappointingly, I've tried pairing it with autoreload in a Jupyter notebook to observe that notebooks imported via importnb are not affected.
Autoreload has no effect on importnb's import of abc.ipynb.
%load_ext autoreload # No effect on the import of abc.ipynb
%autoreload 2 # No effect on the import of abc.ipynb
from importnb import Notebook
from importlib import reload
with Notebook():
import abc
assert abc.__file__.endswith('.ipynb')
reload(abc)
import abc
abc.foo()
Does anyone know how to engage autoreload functionality while using
importnb
package?Autoreload is the automatic reloading of imported content when that content is altered. This functionality is available in Jupyter. For example, to use autoreload in Jupyter, enter the following in a Jupyter cell:
When content in
abc.py
is changed,abc
is re-imported and the changes are effected in the Jupyter notebook.I understand that
importnb
is compatible withimportlib
's reload (see README). Disappointingly, I've tried pairing it with autoreload in a Jupyter notebook to observe that notebooks imported viaimportnb
are not affected.Autoreload has no effect on
importnb
's import ofabc.ipynb
.