Env name normalization update#32
Conversation
| "cloudpickle>=1.6" | ||
| "cloudpickle>=1.6", | ||
| "gym~=0.21", | ||
| "stable-baselines3~=1.7", |
There was a problem hiding this comment.
not sure if it's a good thing that this packages depends on SB3
There was a problem hiding this comment.
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.
oh, that's true, but I think @simoninithomas wanted to switch to gymnasium (so a simple dependency on SB3 should work).
| "numpy", | ||
| "cloudpickle>=1.6" | ||
| "cloudpickle>=1.6", | ||
| "gym~=0.21", |
There was a problem hiding this comment.
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.
I think right now huggingface_sb3 does not support gymnasium anyways (see #30).
There was a problem hiding this comment.
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.0and 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.