-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Make action unwritable #24218
Make action unwritable #24218
Conversation
…env.step()'. Also added a test function to test for immutability.
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.
wow, numpy can do that?!?! we should do this everywhere.
thanks for the tip!
I feel like this change may have exposed a lot of problems with our codebase. |
… into make-action-unwritable
@gjoliver This came originally from @sven1977 :) The errors are due to the fact that actions can be of different type than |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
|
Why are these changes needed?
As actions could be mutated by users in the environment
step()
function and produces hardly traecable errors a better solution is to warn users not to mutat the actions (directly). This PR gives a solution by setting thenumpy
flagWRITEABLE
toFalse
in the_env_runner()
function whn calling the sampler.Related issue number
#23890
Checks
scripts/format.sh
to lint the changes in this PR.