"Set changed size during iteration" Error in Worker.put_key_in_memory()
See original GitHub issueI am getting an error in this line: https://github.com/dask/distributed/blob/d54388c92f5cb6643180749f7d30f580609379a2/distributed/worker.py#L1970
Maybe a temporary copy of ts.dependents helps here?
Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7fa72878fb90>>, <Task finished coro=<Worker.gather_dep() done, defined at [...]/python3.7/site-packages/distributed/worker.py:2000> exception=RuntimeError('Set changed size during iteration')>)
Traceback (most recent call last):
File "[...]/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback
ret = callback()
File "[...]/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result
future.result()
File "[...]/python3.7/site-packages/distributed/worker.py", line 2119, in gather_dep
self.transition(ts, "memory", value=data[d])
File "[...]/python3.7/site-packages/distributed/worker.py", line 1539, in transition
state = func(ts, **kwargs)
File "[...]/python3.7/site-packages/distributed/worker.py", line 1605, in transition_flight_memory
self.put_key_in_memory(ts, value)
File "[...]/python3.7/site-packages/distributed/worker.py", line 1970, in put_key_in_memory
for dep in ts.dependents:
RuntimeError: Set changed size during iteration
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
dictionary changed size during iteration" error? - Stack Overflow
This way you iterate over the original dictionary fields and on the fly can change the desired dict d . It works on...
Read more >RuntimeError: Set changed size during iteration in Python
The Python RuntimeError: Set changed size during iteration in Python occurs when we change the size of a `set` object when iterating over...
Read more >RuntimeError- Set changed size during iteration
RuntimeError: Set changed size during iteration A set needs to stay the same size while you iterate through it , or while you...
Read more >RuntimeError: dictionary changed size during iteration
In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in...
Read more >Issue 43498: "dictionary changed size during iteration" error in ...
run() File ".../components/python/python39/build/prototype/sparc/usr/lib/python3.9/concurrent/futures/process.py", line 317, in run result_item, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks - will try that as soon as I can.
Thanks @gerrymanoim