the reload of utils has been nagging me for a while.
import utils; reload(utils)
I can understand doing a reload in a cell part way through a notebook if the workflow modified the external utils.py file, but not import and reload in the same line.
the reload of utils has been nagging me for a while.
import utils; reload(utils)
I can understand doing a reload in a cell part way through a notebook if the workflow modified the external utils.py file, but not import and reload in the same line.
I think @jeremy mentioned in the videos that it was for if you want to edit utils.py while you are still working on the notebook file.
This way, the reload will force a refresh of the utils parameters that have been imported and use the new ones in whatever other code is using / referencing that library.
At least, that’s what seems to be going on.
ok. I suspect running a cell with import utils; only would not reload an edited utils.py file.
having import utils: and reload(utils) in the same cell works for brevity.