mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-09-17 22:30:59 +00:00
Update long description
This commit is contained in:
parent
ded94baa36
commit
94b1267817
1 changed files with 59 additions and 1 deletions
60
setup.py
60
setup.py
|
|
@ -7,6 +7,64 @@ with open(os.path.join('stable_baselines3', 'version.txt'), 'r') as file_handler
|
||||||
__version__ = file_handler.read()
|
__version__ = file_handler.read()
|
||||||
|
|
||||||
|
|
||||||
|
long_description = """
|
||||||
|
|
||||||
|
# Stable Baselines3
|
||||||
|
|
||||||
|
Stable Baselines3 is a set of improved implementations of reinforcement learning algorithms in PyTorch. It is the next major version of [Stable Baselines](https://github.com/hill-a/stable-baselines).
|
||||||
|
|
||||||
|
These algorithms will make it easier for the research community and industry to replicate, refine, and identify new ideas, and will create good baselines to build projects on top of. We expect these tools will be used as a base around which new ideas can be added, and as a tool for comparing a new approach against existing ones. We also hope that the simplicity of these tools will allow beginners to experiment with a more advanced toolset, without being buried in implementation details.
|
||||||
|
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
Repository:
|
||||||
|
https://github.com/DLR-RM/stable-baselines3
|
||||||
|
|
||||||
|
Medium article:
|
||||||
|
https://medium.com/@araffin/df87c4b2fc82
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
https://stable-baselines.readthedocs.io/en/master/
|
||||||
|
|
||||||
|
RL Baselines3 Zoo:
|
||||||
|
https://github.com/DLR-RM/rl-baselines3-zoo
|
||||||
|
|
||||||
|
## Quick example
|
||||||
|
|
||||||
|
Most of the library tries to follow a sklearn-like syntax for the Reinforcement Learning algorithms using Gym.
|
||||||
|
|
||||||
|
Here is a quick example of how to train and run PPO on a cartpole environment:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import gym
|
||||||
|
|
||||||
|
from stable_baselines3 import PPO
|
||||||
|
from stable_baselines3.ppo import MlpPolicy
|
||||||
|
|
||||||
|
env = gym.make('CartPole-v1')
|
||||||
|
|
||||||
|
model = PPO(MlpPolicy, env, verbose=1)
|
||||||
|
model.learn(total_timesteps=10000)
|
||||||
|
|
||||||
|
obs = env.reset()
|
||||||
|
for i in range(1000):
|
||||||
|
action, _states = model.predict(obs, deterministic=True)
|
||||||
|
obs, rewards, dones, info = env.step(action)
|
||||||
|
env.render()
|
||||||
|
```
|
||||||
|
|
||||||
|
Or just train a model with a one liner if [the environment is registered in Gym](https://github.com/openai/gym/wiki/Environments) and if [the policy is registered](https://stable-baselines.readthedocs.io/en/master/guide/custom_policy.html):
|
||||||
|
|
||||||
|
```python
|
||||||
|
from stable_baselines3 import PPO
|
||||||
|
|
||||||
|
model = PPO('MlpPolicy', 'CartPole-v1').learn(10000)
|
||||||
|
```
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
setup(name='stable_baselines3',
|
setup(name='stable_baselines3',
|
||||||
packages=[package for package in find_packages()
|
packages=[package for package in find_packages()
|
||||||
if package.startswith('stable_baselines3')],
|
if package.startswith('stable_baselines3')],
|
||||||
|
|
@ -50,7 +108,7 @@ setup(name='stable_baselines3',
|
||||||
keywords="reinforcement-learning-algorithms reinforcement-learning machine-learning "
|
keywords="reinforcement-learning-algorithms reinforcement-learning machine-learning "
|
||||||
"gym openai stable baselines toolbox python data-science",
|
"gym openai stable baselines toolbox python data-science",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
long_description="",
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue