Editing the @ct.lattice
executor in a Jupyter Notebook is not always reflected if importing a @ct.electron
#1942
Labels
bug
Something isn't working
Environment
What is happening?
I have built a Python package containing a bunch of pre-made
@ct.electron
-decorated functions. When using a Jupyter Notebook, however, I get some unfortunate mutability issues, described in greater detail below. This isn't necessarily a bug per se, but I'd love to get your input on how to better address this conundrum.How can we reproduce the issue?
First, I installed the necessary packages:
Then, in a Jupyter Notebook I ran the following in a cell:
This will properly use the "dask" executor. However, when I edit
executor="dask"
to beexecutor="local"
and re-run the same cell, the executor in the GUI still shows as "dask" when it should be "local".I believe the reason for this comes down to mutability. It seems that doing
when I run it the first time yields "dask". However, when I rerun with the updated
executor
, it still shows "dask" even though we are running with "local".What should happen?
The imported
@ct.electron
should have its executor dynamically updated.Any suggestions?
None, but I'm open to suggestions! This seems potentially related to #1889, but I think it may be slightly different. Feel free to close if it's a duplicate.
The text was updated successfully, but these errors were encountered: