-
Notifications
You must be signed in to change notification settings - Fork 418
[BugFix] Initialising the classes LazyTensorStorage with a nested TensorDict raises error #703
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
Conversation
|
Good catch! |
|
I might be missing something but wasn't the implementation of lazymemmaptensor already solving that issue? |
1 similar comment
|
I might be missing something but wasn't the implementation of lazymemmaptensor already solving that issue? |
Seems like I did not have the latest version of tensordict, that is why I was getting also an error for LazyTensorStorage. I reverted the latest changes. And then fixed LazyTensorStorage |
f48bb28 to
761acb5
Compare
vmoens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Do you mind copying the code snippet that caused the error in a test in test_rb.py for the tensor and memmap version?
done! |
Description
Initialising the class LazyTensorStorage with a nested TensorDict raises the following error
It it due to a call to tensor.expand . I just added the the dimensions of tensor to the output shape, and now it does not crash anymore.
The error can be reproduced with the following code:
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
xin all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!