-
Notifications
You must be signed in to change notification settings - Fork 23
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
Env name normalization update #32
Env name normalization update #32
Conversation
setup.py
Outdated
"cloudpickle>=1.6" | ||
"cloudpickle>=1.6", | ||
"gym~=0.21", | ||
"stable-baselines3~=1.7", |
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.
not sure if it's a good thing that this packages depends on SB3
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.
SB3 is used in push_to_hub.py
so it makes sense to depend on it?
I set up a venv for huggingface_sb3
, installed it there and then wanted to run the tests. Those tests failed due to missing gym and sb3 dependencies.
Therefore I added them.
Why do you think we should not add the dependency?
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.
oh, that's true, but I think @simoninithomas wanted to switch to gymnasium (so a simple dependency on SB3 should work).
setup.py
Outdated
@@ -5,7 +5,9 @@ | |||
"pyyaml~=6.0", | |||
"wasabi", | |||
"numpy", | |||
"cloudpickle>=1.6" | |||
"cloudpickle>=1.6", | |||
"gym~=0.21", |
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.
this prevents hf hub sb3 from using it with gymnasium/sb3, no? is it needed only for the tests?
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 think right now huggingface_sb3
does not support gymnasium
anyways (see #30).
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.
Hey there 👋 I'm finishing the gymnasium integration can we remove this requirement? (gym one)
The PR: https://github.com/huggingface/huggingface_sb3/compare/gymnasium-v2
Hey there 👋 , we currently updating the huggingface_sb3 package for gymnasium. I want to merge also your PR before publishing v2.3. The PR: https://github.com/huggingface/huggingface_sb3/compare/gymnasium-v2 Can we remove:
|
Sure I just removed them. |
LGTM thanks 🤗 is there's something else you want to add to this PR or I can merge it? |
I just added some tests for the error case. Now I think it is ready. |
Perfect I merge it. For the pip package (v2.3) it will be done next thursday (I'm off from Wed to Wed). In the meantime you can install from gymnasium-v2 branch. Thanks again for your help 🤗 |
Since
gym>=0.21.0
and withgymnasium
, there is the possibility to add apackage:
prefix to the Gym ID to ensure that the given package is imported before creating the environment.More details here: HumanCompatibleAI/imitation#743 (comment)
This PR ensures that this package prefix is being removed from normalized environment names.
It also adds some missing dependencies.