-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload semantics #38
Comments
Thanks for opening the issue and the nice comments. One of the limitation here is the one of Python's import, and I am not familiar enough with the internal to know whether what you ask is possible. In JupyterLab you should be able to attach the same kernel to both notebook, which might help mitigate the issue. |
I got the same error when trying to change and save the file where my helper functions were defined within Jupyter Notebooks. Rerunning the below line in a jupyter cell would not reload the newly saved functions.
@mikepurvis solution worked for me. I ran:
|
/opt/anaconda3/envs/ml/lib/python3.7/importlib/init.py in reload(module) TypeError: reload() argument must be a module I got this error when I try to reload one function under my helper_fun.ipynb file when I ran
|
…python#38) * Simplify the way we handle exceptions * Add tests for capture_output and partial * Add Lazy to the top level API * Include a notebook parameterization module (ipython#37)
I'm in JupyterLab, with two notebooks open, one of which is importing a function from the other (
tools.ipynb
):However, it doesn't seem to pick up changes from the other one, even when I re-run the cell containing the import. However, if I:
Then it does indeed pick it up changes each time. Unfortunately, this doesn't work for the
from X import Y
style, since the reference to the module containing the imported item isn't in scope to pass toreload
.Is it possible that ipynb could watch timestamps on the imported files and handle this under the hood when the imported file changes? Thanks for a great project!
The text was updated successfully, but these errors were encountered: