Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Feature] Max Value Writer #1622
[Feature] Max Value Writer #1622
Changes from 1 commit
a8b29ac
c18db48
3d6d9eb
6f07af1
a02c2d8
2b12160
bd32b3c
b6e1be8
e90f4f0
b383615
2aa659b
ee93f20
23e1888
466ee57
7f6ca5f
8ec741b
36063dd
da8eb3a
846170c
faad875
48a7f31
9d00f10
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this safe?
Maybe we should document what are the expected shapes for this class, eg
but not
Another option is to check the number of dimensions of the ranking key OR the name of the last dim of the input tensordict (which should be "time").
Not raising any exception and just doing a plain sum could lead to surprising results I think
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.
I added the first option. Since the ranking value has to be a single float we only allow data of the shape [] and [T] for the
add
method and [B] and [B, T] for theextend
method. If data has a time dimension, we sum along it. If too many dimensions are provided, an error is raised.I did not go for checking the dimension names because it seemed to restrictive. I don't think time dimension is always labelled
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.
Not always but mostly
if you get your data from env.rollout or collector, it will.
If from there you store the data in a rb, it will keep the tag.
But if you reshape or do other stuff it could go away.