huggingface / huggingface_sb3

Additional code for Stable-baselines3 to load and upload models from the Hub.
77 stars 23 forks source link

Env name normalization update #32

Closed ernestum closed 1 year ago

ernestum commented 1 year ago

Since gym>=0.21.0 and with gymnasium, there is the possibility to add a package: prefix to the Gym ID to ensure that the given package is imported before creating the environment.

More details here: https://github.com/HumanCompatibleAI/imitation/pull/743#issuecomment-1620179983

This PR ensures that this package prefix is being removed from normalized environment names. It also adds some missing dependencies.

simoninithomas commented 1 year ago

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:

ernestum commented 1 year ago

Sure I just removed them.

simoninithomas commented 1 year ago

LGTM thanks 🤗 is there's something else you want to add to this PR or I can merge it?

ernestum commented 1 year ago

I just added some tests for the error case. Now I think it is ready.

simoninithomas commented 1 year ago

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 🤗