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

[BUG] VideoRecorder Crashes When Passing fps #2826

Closed
3 tasks done
AlexandreBrown opened this issue Mar 4, 2025 · 0 comments · Fixed by #2827
Closed
3 tasks done

[BUG] VideoRecorder Crashes When Passing fps #2826

AlexandreBrown opened this issue Mar 4, 2025 · 0 comments · Fixed by #2827
Assignees
Labels
bug Something isn't working

Comments

@AlexandreBrown
Copy link
Contributor

Describe the bug

Creating an instance of VideoRecorder crashes when we pass fps.

To Reproduce

from torchrl.record import VideoRecorder
VideoRecorder(None, None, "", None, fps=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mila/b/browna/.conda/envs/maniskill3_env/lib/python3.10/site-packages/torchrl/record/recorder.py", line 127, in __init__
    self.video_kwargs["fps"] = fps
  File "/home/mila/b/browna/.conda/envs/maniskill3_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in __getattr__
    raise AttributeError(
AttributeError: 'VideoRecorder' object has no attribute 'video_kwargs'

Expected behavior

No crash

System info

Describe the characteristic of your environment:

  • Describe how the library was installed (pip, source, ...) torchrl==0.7.1
  • Python version 3.10
print(torchrl.__version__, numpy.__version__, sys.version, sys.platform)
0.7.1 1.26.4 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0] linux

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants