-
Notifications
You must be signed in to change notification settings - Fork 327
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
Not knowing Which key is causing shape mismatch #2222
Comments
Is this expected? We have allowed dynamic shapes in nightlies, it will be part of the next major release. You can just set RE your suggestion: |
No. The changes of shapes aren't desired. My codes are having a bug.
I agree. That would be nicer. |
Ok I guess my initial understanding was that you were expecting your shapes to change and wanted to work around the exceptions, I now understand that the problem is that the exception are not informative enough |
Hi there. I'm having problems with my environment rollout. Sometimes my environment shapes are changing somehow. If in the except block I'm going to mention, you don't set any type for the exception it would be much better. Because alongside the exception about shape mismatch another exception would raise saying which key caused this problem.
here is the line I'm suggesting to change:
https://github.com/pytorch/rl/blob/3787a9edeea03cb9e98b928824072b939c327776/torchrl/data/tensor_specs.py#L3978C20-L3978C28
and here is the line a raising shape mismatch:
rl/torchrl/data/tensor_specs.py
Line 587 in 3787a9e
note that if the shapes of observations are different currently just the shape mismatch exception would be raised due to different exception types.
The text was updated successfully, but these errors were encountered: