-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
change create dataset from buffer to ensure same behavior with create data from env #146
change create dataset from buffer to ensure same behavior with create data from env #146
Conversation
Thanks for this contribution, and I agree with the direction. It looks correct to me. Please write a test which makes sure a partial episode is correctly marked with a truncation when calling |
Hi @balisujohn , |
Once typos I pointed out are fixed and pre-commit is passing, this is ready to merge :^) |
Hi, finally I turned back to fix the problem. Could you check it again? |
…fixbug into fix_create_from_buffer
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.
@im-Kitsch thanks for doing this; it seems good. However, would you mind to wait until #133 is merged?
The problem will be solved by that PR, but we may want to add your test
else: | ||
assert ( | ||
eps_buff["terminations"][-1] or eps_buff["truncations"][-1] | ||
), "Each episode must be terminated or truncated before adding it to a Minari dataset" |
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.
it looks like this branch is not very useful, I would remove it
@younik Hi, thanks for the reply, looks after #133 , merging data would diable |
Right @im-Kitsch, thanks for your help :) |
Description
Hi,
I think it would be better to keep
create_from_buffer
andcreate_from_collevtor_env
having same bahavior. If we create dataset from collector env, the last episode will be marked as truncated if it's incomplete trajectory. But if create dataset from replay buffers, incomplete trajector will be rejected.Type of change
Screenshots
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)pytest -v
and no errors are present.pytest -v
has generated that are related to my code to the best of my knowledge.