-
Notifications
You must be signed in to change notification settings - Fork 634
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
Liberate the requirements.txt #387
Comments
Hi @ThijsvandenBerg, thanks for reporting this issue. We are actively migrating to gymnasium and the latest version of SB3, but this might take a while. Specifically regarding your request, the Lines 15 to 49 in 7104666
|
Thanks @vwxyzjn! After the upgrade, would you then no long pin SB3 (to the new version you're migrating to)? Pinning makes it very difficult to modules in combinations with other modules, ..and we use quite a lot of ML modules. Another option would be that I write a unit test (not sure if that's feasible, just an idea) on the interface between cleanrl and SB3, ..then iterate over the SB3 versions to determine what versions are supported and which are causing integration issues,.. and then report those working versions back, so that the requirements can be changed to reflect that? |
For what it's worth, our recent releases of PettingZoo 1.23.1 and SuperSuit 3.8.0 have made the API fully consistent with Gymnasium, and shouldn't be too hard to migrate to if you are updating the code for Gymnasium already. I would be happy to help with the PettingZoo upgrades if need be, I updated the PettingZoo CleanRL tutorial to work with the current versions of PettingZoo/SuperSuit which wasn't too much work. I agree with @ThijsvandenBerg for sure though, pinning specific versions of dependencies leads to many headaches down the road, definitely better to loosen the requirements and say greater than or equal to whichever version you have tested, and then if it breaks down the line someone can make an issue and it can be fixed. Much better that way than setting hard requirements and making it impossible to install your library with newer versions of other libraries. |
#424 should have migrated to gymnasiuma nd upgraded SB3's version. |
Problem Description
the requirements.txt are too strict, in particular the stable-baselines3 = "1.2.0" version pinning. This makes it impossible to use cleanrl in combinations with other python modules that require more recent versions of those dependencies.
There is also version pinning in the optional requirements like:
Checklist
poetry install
(see CleanRL's installation guideline.Current Behavior
When building our research environment we get:
ERROR: Cannot install -r requirements.txt (line 50) and stable-baselines3>=1.8.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested stable-baselines3>=1.8.0
cleanrl 1.1.0 depends on stable-baselines3==1.2.0
Expected Behavior
Non conflicting version solutions when other module have requirement that don't exactly match the pinned requirements.
Possible Solution
In particular, change the stable-baselines3 requirement to stable-baselines3>=1.2.0
In general, cleanrl should switch all dependencies to ">=" dependencies in pyproject.toml or requirements.txt, with liberal lower-bounds (the oldest valid version of a 3rd party dependency) to improve the interoperability and usability of cleanrl within other projects.
Steps to Reproduce
make a requirments.txt file or a pyproject.toml with:
stable-baselines3>=1.8.0
cleanrl >= 1.1.0
and then try to install things.
The text was updated successfully, but these errors were encountered: