Skip to content

Error from changes in engine.py #1705

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

Closed
mmueller00 opened this issue Mar 31, 2025 · 2 comments
Closed

Error from changes in engine.py #1705

mmueller00 opened this issue Mar 31, 2025 · 2 comments

Comments

@mmueller00
Copy link

I am getting an exception which is probably stemming from a change in the engine.py. It is either due to a new import (from torch.utils.tensorboard import SummaryWriter) or a change in the Engine class. See #1704

EXCEPTION
Traceback (most recent call last):
  File "/u/marten.mueller/dev/ctc_baseline/returnn/rnn.py", line 11, in <module>
    line: main()
    locals:
      main = <local> <function main at 0x755c7cb37ba0>
  File "/u/marten.mueller/dev/ctc_baseline/returnn/returnn/__main__.py", line 743, in main
    line: init(command_line_options=argv[1:])
    locals:
      init = <global> <function init at 0x755c7cb37880>
      command_line_options = <not found>
      argv = <local> ['/u/marten.mueller/dev/ctc_baseline/returnn/rnn.py', '/u/marten.mueller/dev/ctc_baseline/work/i6_core/returnn/training/ReturnnTrainingJob.jLl6e0M1VKU5/output/returnn.config'], _[0]: {len = 49}
  File "/u/marten.mueller/dev/ctc_baseline/returnn/returnn/__main__.py", line 456, in init
    line: with util.ReportImportedDevModules(description="RETURNN init"):
    locals:
      util = <global> <module 'returnn.util.basic' from '/u/marten.mueller/dev/ctc_baseline/returnn/returnn/util/basic.py'>
      util.ReportImportedDevModules = <global> <class 'returnn.util.basic.ReportImportedDevModules'>
      description = <not found>
  File "/u/marten.mueller/dev/ctc_baseline/returnn/returnn/util/basic.py", line 593, in ReportImportedDevModules.__exit__
    line: for mod_name, mod in sys.modules.items():
    locals:
      mod_name = <local> '__returnn_config__', len = 18
      mod = <local> <module '__returnn_config__' from '/u/marten.mueller/dev/ctc_baseline/work/i6_core/returnn/training/ReturnnTrainingJob.jLl6e0M1VKU5/output/returnn.config'>
      sys = <global> <module 'sys' (built-in)>
      sys.modules = <global> {'sys': <module 'sys' (built-in)>, 'builtins': <module 'builtins' (built-in)>, '_frozen_importlib': <module '_frozen_importlib' (frozen)>, '_imp': <module '_imp' (built-in)>, '_thread': <module '_thread' (built-in)>, '_warnings': <module '_warnings' (built-in)>, '_weakref': <module '_weakref' (bu..., len = 5494
      sys.modules.items = <global> <built-in method items of dict object at 0x755ca66e5380>
RuntimeError: dictionary changed size during iteration
@albertz
Copy link
Member

albertz commented Mar 31, 2025

Where do you have the from torch.utils.tensorboard import SummaryWriter? In your config?

I think the problem is clear then (anyway).

@albertz
Copy link
Member

albertz commented Mar 31, 2025

I pushed a fix. Can you test again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants