-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionary changed size during iteration #1201
Comments
I'm still baffled what is mutating this. Additionally, it appears that content (
|
I also tried this with python 3.5 and got the same error. |
That definitely looks like a bug. Chances are it's not being mutated by that function, but rather by the thread that's reading for new events. In Python2 the solution would be simple, which is called |
A deepcopy on tag_to_content seems to fix it, although wow is this going slow now. |
Yes there's a lot of stuff in there. Adding a lock around the precise data structure is likely what's required. I'm surprised we haven't encountered this before. |
I actually have seen this crop up before, though it's generally been hard to reproduce. I think a sufficient fix would be adding another set of locks, one per value of
I think this shouldn't be too much of a performance hit, hopefully less than a deepcopy on every read, which I don't think would 100% prevent the issue (since I don't think deepcopy is atomic in python, so it could still hit the race condition, there's just a smaller window for it). |
Is there any way around this? Tensorboard was running for me for good 2 weeks then this problem started happening and it won't work anymore. Can't really downgrade to1.7 as am using TF 1.8 functionalities. |
For now one workaround could be setting the background reload via |
This should be fixed by #1235 and will be in the 1.9 release of TensorBoard. |
I'm getting this RuntimeError. There doesn't seem to be a way for the tag_to_content to change though.
The text was updated successfully, but these errors were encountered: