-
-
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
small simple bug-fix: update lost infos in function create_dataset function #144
Conversation
Good catches. Thanks for your contribution! All these fixes look correct to me. I think it would be good to make the values for |
Hi, I pushed update to save I agree that we need consider if minari version should be optional or mandatory. Futhermore, I think the dataset's structure should be clearly specified and let it be stable. E.g. here in Lines 277 to 290 in ea40978
There should be still small errors like this one. I think this is just caused by more attributes added and not stablely specified. |
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.
The code seems almost ready to merge. Please remove the commented out lines, and add a basic test to for behavior when the optional dataset_metadata
keys modified in this PR are provided when creating an instance of MinariDataset
minari/utils.py
Outdated
combined_data_file.attrs.modify( | ||
optional_parameter, dataset_file.attrs[optional_parameter] | ||
) | ||
# combined_data_file.attrs.modify("author", dataset_file.attrs["author"]) |
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.
please remove commented out lines
Hi, I think these tests should be modified in the future again, since currently those additional infomations could not be got directly from |
assert dt_file.attrs["code_permalink"] == _final_code_link | ||
assert dt_file.attrs["author"] == "WillDudley" + str(n_data - 1) | ||
assert dt_file.attrs["author_email"] == "wdudley@farama.org" + str(n_data - 1) |
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.
btw, this behavior is a little weird in combine dataset (you just save the attributes of the last)
Anyway, it is fixed in #133 that we will merge after, so it is okay for now
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.
Ah, yes, I don't think only saving the attribute of last is a good choice, but it's just to keep same with combine_dataset()
implementation. Definitely it will be changed in the future, but this PR is just to save the fogortten metadata code_permalink
and algorithm_name
.
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.
Just fix the pre-commit, and then looks good to me
Hi, I think the pre-commit is fixed now. |
Description
This is fix for simple bug-fix for function
create_dataset_from_collector_env()
.algorithm name
author
author Email
is not saved though it's passed into function.for function
create_dataset_from_collector_env()
ref_min/ref_max score is not saved to metadata, it's easily to find the problem.
I think the bugs are quite clear and definitely is a bug, you can take a look,
Type of change
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.