Open mumususu opened 2 years ago
Here is an unofficial workaround that seems to work for refreshing callback cells without restarting the kernel:
~/anaconda3/lib/python3.9/site-packages/jupyter_dash/jupyter_app.py
(note: the path may differ depending on your system type and installation location of jupyter-dash)jupyter_app.py
in a text editorkwargs['dev_tools_hot_reload'] = mode == "external"
to be
kwargs['dev_tools_hot_reload'] = True
and then save and close the fileThis uses the hot reload capability of Dash to allow you to edit and run Jupyter cells and then see the changes for any newly-drawn callbacks. Any HTML that is already rendered won't change, however. Perhaps the dash or jupyter-dash authors know of a way to safely refresh all rendered objects?
Also, note that jupyter_app.py
mentions that enabling the code change above can sometimes cause Jupyter problems when there is no active kernel. I haven't encountered this issue yet.
this might also be solved by https://github.com/plotly/jupyter-dash/pull/105
I am using jupyter dash to make a dash project on a jupyter notebook. Every time I update my code, I have to kill the kernel and then restart the jupyter notebook to get the changed code to work properly. Otherwise, the dash page will show a double loading error. I would like to know if there is a way to refresh the jupyter dash server without restarting the kernel.