-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Correct obs type in parallel_rps doc example #1170
Correct obs type in parallel_rps doc example #1170
Conversation
The value was an int, but all the testing expects obsevations to be numpy types. This has been changed with updates comments to explain.
docs/code_examples/parallel_rps.py
Outdated
observations = { | ||
self.agents[i]: int(actions[self.agents[1 - i]]) | ||
self.agents[i]: np.array(actions[self.agents[1 - i]], dtype=np.int_) |
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 np.int_ the correct dtype?
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.
Actually, it looks like np.int64 may be the most correct choice. int_ is the same on most platforms, but maybe not all
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.
Yeah int64 is what I've seen elsewhere in the code
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.
If you could fix this I can merge it
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 pushed a fix the pr
correct type and update name to be less confusing
I updated the type to int64, and made the initial state a bit more clear |
The value was an int, but all the testing expects observations to be numpy types. This has been changed with updated comments to explain.
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.