Viktor
09/18/2024, 8:21 PMStefan Krawczyk
09/18/2024, 8:28 PMimport importlib
importlib.reload(MODULE)
or try using the reload extension magic
%load_ext autoreload
%autoreload 2
I haven’t tried the second one with the hamilton jupyter magic thoughViktor
09/18/2024, 8:47 PM%%cell_to_module reload_test_module
import dag_common
import importlib
importlib.reload(dag_common)
from dag_common import commonfunction
It seems to be necessary, to load the module first (not only the actually desired function), so that can be reloaded … and after that, the specified import can happen.
Does this exist somewhere in the documentation?
I was only able to find the reloading of an entire hamilton dag module on https://hamilton.dagworks.io/en/latest/how-tos/use-in-jupyter-notebook/#step-3-the-basic-process-of-iterationStefan Krawczyk
09/18/2024, 9:07 PMStefan Krawczyk
09/18/2024, 9:07 PM