araffin / rl-baselines-zoo

A collection of 100+ pre-trained RL agents using Stable Baselines, training and hyperparameter optimization included.
https://stable-baselines.readthedocs.io/
MIT License
1.12k stars 206 forks source link

[feature request] Install Zoo as a package #107

Closed brendenpetersen closed 3 years ago

brendenpetersen commented 3 years ago

It would be great to be able to install Zoo as a package/module (even better would be one registered to PyPI) so that I can access things like utils from other projects.

Until then I think my options are:

  1. Use sys.path.append(ZOO_REPOSITORY_ROOT).
  2. Add my own setup.py.
  3. Copy/link the code to site-packages.

None of these are great options when I'd like my project to view Zoo as a dependency.

araffin commented 3 years ago

Hello, I understand your issue. However, the rl zoo is not really meant to be a package. My main concern is that the current repo is quite big because of the trained agents, which is not the case anymore in the newest version of the zoo: https://github.com/DLR-RM/rl-baselines3-zoo.

None of these are great options when I'd like my project to view Zoo as a dependency.

If you have a custom version of the zoo that is online (with a setup.py, you can always write it as a pip dependency:

pip install git+https://github.com/DLR-RM/rl-baselines3-zoo

would work ;) (with a proper setup.py)

brendenpetersen commented 3 years ago

@araffin Thanks for the reply. Yes, I was afraid that was going to be your answer 😜 Though it's understandable given that there is data in the repo. I was just hoping to be able to use it as a dependency without maintaining a fork of zoo with an added setup.py.

When you say "with a proper setup.py", do you mean one I'd write inside (a fork of) zoo? Or are you saying I could mangle my own project's setup.py to install zoo as a package (which doesn't have setup.py). If the latter is possible, that would work for me.

Also, I was not aware of https://github.com/DLR-RM/rl-baselines3-zoo. Or even stable-baselines3. Thanks!

araffin commented 3 years ago

i meant a setup.py in your fork.

Also, I was not aware of https://github.com/DLR-RM/rl-baselines3-zoo. Or even stable-baselines3.

oh...we should advertise it more, we are close to a 1.0 (the library is already usable, we mostly need to polish several aspects)

araffin commented 3 years ago

Good news for you, I'll migrate most of the utils (wrappers and callbacks) to the sb3 contrib package ;)

brendenpetersen commented 3 years ago

@araffin Awesome! Thanks so much for letting me know!!

araffin commented 1 year ago

now done in now done in https://github.com/DLR-RM/rl-baselines3-zoo/releases