Skip to content
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

Add 'with EventStorage()' context #5446

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ostrowskimarcin
Copy link

Currently I'm using pytorch to test some models benchmarks with compile mode - https://github.com/pytorch/pytorch/tree/main/benchmarks/dynamo
When I run detectron2-* models following error appears:

storage = get_event_storage()
  File "/usr/local/lib/python3.10/dist-packages/detectron2/utils/events.py", line 34, in get_event_storage
    assert len(
AssertionError: get_event_storage() has to be called inside a 'with EventStorage(...)' context!

It seems that the code doesn't get the storage in a proper way. I added a context to each required place and it works for me.
I also noticed that this usage is present in other different places in repo but I left it as it is.
Could you take a look?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants