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

RuntimeError when using profiler. #636

Open
beatwad opened this issue Mar 11, 2024 · 0 comments
Open

RuntimeError when using profiler. #636

beatwad opened this issue Mar 11, 2024 · 0 comments

Comments

@beatwad
Copy link

beatwad commented Mar 11, 2024

When using "pytorch" profiler an error occurs:

RuntimeError: Tried to serialize object __torch__.torch.classes.profiler._RecordFunction which does not have a __getstate__ method defined!

I suppose it's happening when PL Trainer module tries to save checkpoint after profiler finishes the job. Trainer by default always tries to save checkpoints even when all callbacks are disabled.

Solution: change file configs/debug/profiler.yaml:

trainer:
  profiler: "simple"  
  # profiler: "advanced"
  # profiler: "pytorch"
  profiler: "pytorch"
  enable_checkpointing: False
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

1 participant