-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
removed inline RandomNumberGenerator implementation #3022
Conversation
… alias to np.random.Generator
gym/utils/seeding.py
Outdated
bigint, mod = divmod(bigint, 2**32) | ||
ints.append(mod) | ||
return ints | ||
RandomNumberGenerator = np.random.Generator |
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.
RandomNumberGenerator = np.random.Generator | |
RNG = RandomNumberGenerator = np.random.Generator |
I think we shall leave the short name convenience (line 137).
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.
Sounds good
Is there actually anything preventing us from removing the |
I think for backward compatibility then we should keep it |
In that case, let's keep the synonyms ( |
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.
LGTM
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.
Removing hash_seed from utils/seeding.py breaks gym-retro, which looks for this function there.
The specific line is here:
https://github.com/openai/retro/blob/master/retro/retro_env.py#L214
You will need to install an older version of gym |
Description
Removed inline RandomNumberGenerator implementation and replaced with alias to np.random.Generator.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)