You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should work the second time, since time has now been imported and f has been redefined. However, instead it fails with the same error as the first time.
RayTaskError(NameError): ray_worker:__main__.f() (pid=27630, ip=192.168.42.11)
File "python/ray/_raylet.pyx", line 548, in ray._raylet.execute_task
with core_worker.profile_event(b"task:execute"):
File "python/ray/_raylet.pyx", line 550, in ray._raylet.execute_task
outputs = function_executor(*args, **kwargs)
File "<ipython-input-1-eadbd19a0c80>", line 7, in f
NameError: name 'time' is not defined
Note that if I modify the code in f slightly, e.g., to sleep for 2 seconds instead of 1, then it works.
@edoakes@pcmoritz I assume that we're hashing the function source code instead of the pickled function and that's what's causing the issue. Forgetting import statements happens all the time in interactive development in IPython and you often need to import them and then redefine the function.
The text was updated successfully, but these errors were encountered:
robertnishihara
changed the title
Function definitions appear to not be are sometimes not updated when redefined?
Function definitions are not updated when redefined.
Nov 10, 2019
robertnishihara
changed the title
Function definitions are not updated when redefined.
Function definitions are not always updated when redefined.
Nov 10, 2019
System information
Run the following in IPython.
Then in the same interpreter, run
It should work the second time, since
time
has now been imported andf
has been redefined. However, instead it fails with the same error as the first time.Note that if I modify the code in
f
slightly, e.g., to sleep for 2 seconds instead of 1, then it works.@edoakes @pcmoritz I assume that we're hashing the function source code instead of the pickled function and that's what's causing the issue. Forgetting import statements happens all the time in interactive development in IPython and you often need to import them and then redefine the function.
The text was updated successfully, but these errors were encountered: