Initial commit
Browse files- .gitattributes +1 -0
- README.md +97 -3
- args.yml +85 -0
- config.yml +45 -0
- env_kwargs.yml +1 -0
- ppo_lstm-CarRacing-v3.zip +3 -0
- ppo_lstm-CarRacing-v3/_stable_baselines3_version +1 -0
- ppo_lstm-CarRacing-v3/data +0 -0
- ppo_lstm-CarRacing-v3/policy.optimizer.pth +3 -0
- ppo_lstm-CarRacing-v3/policy.pth +3 -0
- ppo_lstm-CarRacing-v3/pytorch_variables.pth +3 -0
- ppo_lstm-CarRacing-v3/system_info.txt +8 -0
- replay.mp4 +3 -0
- results.json +1 -0
- train_eval_metrics.zip +3 -0
- vec_normalize.pkl +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: stable-baselines3
|
| 3 |
+
tags:
|
| 4 |
+
- CarRacing-v3
|
| 5 |
+
- deep-reinforcement-learning
|
| 6 |
+
- reinforcement-learning
|
| 7 |
+
- stable-baselines3
|
| 8 |
+
model-index:
|
| 9 |
+
- name: RecurrentPPO
|
| 10 |
+
results:
|
| 11 |
+
- task:
|
| 12 |
+
type: reinforcement-learning
|
| 13 |
+
name: reinforcement-learning
|
| 14 |
+
dataset:
|
| 15 |
+
name: CarRacing-v3
|
| 16 |
+
type: CarRacing-v3
|
| 17 |
+
metrics:
|
| 18 |
+
- type: mean_reward
|
| 19 |
+
value: 384.92 +/- 161.14
|
| 20 |
+
name: mean_reward
|
| 21 |
+
verified: false
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
# **RecurrentPPO** Agent playing **CarRacing-v3**
|
| 25 |
+
This is a trained model of a **RecurrentPPO** agent playing **CarRacing-v3**
|
| 26 |
+
using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3)
|
| 27 |
+
and the [RL Zoo](https://github.com/DLR-RM/rl-baselines3-zoo).
|
| 28 |
+
|
| 29 |
+
The RL Zoo is a training framework for Stable Baselines3
|
| 30 |
+
reinforcement learning agents,
|
| 31 |
+
with hyperparameter optimization and pre-trained agents included.
|
| 32 |
+
|
| 33 |
+
## Usage (with SB3 RL Zoo)
|
| 34 |
+
|
| 35 |
+
RL Zoo: https://github.com/DLR-RM/rl-baselines3-zoo<br/>
|
| 36 |
+
SB3: https://github.com/DLR-RM/stable-baselines3<br/>
|
| 37 |
+
SB3 Contrib: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib
|
| 38 |
+
SBX (SB3 + Jax): https://github.com/araffin/sbx
|
| 39 |
+
|
| 40 |
+
Install the RL Zoo (with SB3 and SB3-Contrib):
|
| 41 |
+
```bash
|
| 42 |
+
pip install rl_zoo3
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
# Download model and save it into the logs/ folder
|
| 47 |
+
python -m rl_zoo3.load_from_hub --algo ppo_lstm --env CarRacing-v3 -orga frankcholula -f logs/
|
| 48 |
+
python -m rl_zoo3.enjoy --algo ppo_lstm --env CarRacing-v3 -f logs/
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
If you installed the RL Zoo3 via pip (`pip install rl_zoo3`), from anywhere you can do:
|
| 52 |
+
```
|
| 53 |
+
python -m rl_zoo3.load_from_hub --algo ppo_lstm --env CarRacing-v3 -orga frankcholula -f logs/
|
| 54 |
+
python -m rl_zoo3.enjoy --algo ppo_lstm --env CarRacing-v3 -f logs/
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Training (with the RL Zoo)
|
| 58 |
+
```
|
| 59 |
+
python -m rl_zoo3.train --algo ppo_lstm --env CarRacing-v3 -f logs/
|
| 60 |
+
# Upload the model and generate video (when possible)
|
| 61 |
+
python -m rl_zoo3.push_to_hub --algo ppo_lstm --env CarRacing-v3 -f logs/ -orga frankcholula
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Hyperparameters
|
| 65 |
+
```python
|
| 66 |
+
OrderedDict([('batch_size', 128),
|
| 67 |
+
('clip_range', 0.2),
|
| 68 |
+
('ent_coef', 0.0),
|
| 69 |
+
('env_wrapper',
|
| 70 |
+
[{'rl_zoo3.wrappers.YAMLCompatResizeObservation': {'shape': [64,
|
| 71 |
+
64]}},
|
| 72 |
+
{'gymnasium.wrappers.transform_observation.GrayscaleObservation': {'keep_dim': True}}]),
|
| 73 |
+
('frame_stack', 2),
|
| 74 |
+
('gae_lambda', 0.95),
|
| 75 |
+
('gamma', 0.99),
|
| 76 |
+
('learning_rate', 'lin_1e-4'),
|
| 77 |
+
('max_grad_norm', 0.5),
|
| 78 |
+
('n_envs', 8),
|
| 79 |
+
('n_epochs', 10),
|
| 80 |
+
('n_steps', 512),
|
| 81 |
+
('n_timesteps', 4000000.0),
|
| 82 |
+
('normalize', "{'norm_obs': False, 'norm_reward': True}"),
|
| 83 |
+
('policy', 'CnnLstmPolicy'),
|
| 84 |
+
('policy_kwargs',
|
| 85 |
+
'dict(log_std_init=-2, ortho_init=False, '
|
| 86 |
+
'enable_critic_lstm=False, activation_fn=nn.GELU, '
|
| 87 |
+
'lstm_hidden_size=128, )'),
|
| 88 |
+
('sde_sample_freq', 4),
|
| 89 |
+
('use_sde', True),
|
| 90 |
+
('vf_coef', 0.5),
|
| 91 |
+
('normalize_kwargs', {'norm_obs': False, 'norm_reward': False})])
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
# Environment Arguments
|
| 95 |
+
```python
|
| 96 |
+
{'render_mode': 'rgb_array'}
|
| 97 |
+
```
|
args.yml
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!!python/object/apply:collections.OrderedDict
|
| 2 |
+
- - - algo
|
| 3 |
+
- ppo_lstm
|
| 4 |
+
- - conf_file
|
| 5 |
+
- null
|
| 6 |
+
- - device
|
| 7 |
+
- auto
|
| 8 |
+
- - env
|
| 9 |
+
- CarRacing-v3
|
| 10 |
+
- - env_kwargs
|
| 11 |
+
- null
|
| 12 |
+
- - eval_env_kwargs
|
| 13 |
+
- null
|
| 14 |
+
- - eval_episodes
|
| 15 |
+
- 5
|
| 16 |
+
- - eval_freq
|
| 17 |
+
- 25000
|
| 18 |
+
- - gym_packages
|
| 19 |
+
- []
|
| 20 |
+
- - hyperparams
|
| 21 |
+
- null
|
| 22 |
+
- - log_folder
|
| 23 |
+
- logs
|
| 24 |
+
- - log_interval
|
| 25 |
+
- -1
|
| 26 |
+
- - max_total_trials
|
| 27 |
+
- null
|
| 28 |
+
- - n_eval_envs
|
| 29 |
+
- 1
|
| 30 |
+
- - n_evaluations
|
| 31 |
+
- null
|
| 32 |
+
- - n_jobs
|
| 33 |
+
- 1
|
| 34 |
+
- - n_startup_trials
|
| 35 |
+
- 10
|
| 36 |
+
- - n_timesteps
|
| 37 |
+
- -1
|
| 38 |
+
- - n_trials
|
| 39 |
+
- 500
|
| 40 |
+
- - no_optim_plots
|
| 41 |
+
- false
|
| 42 |
+
- - num_threads
|
| 43 |
+
- -1
|
| 44 |
+
- - optimization_log_path
|
| 45 |
+
- null
|
| 46 |
+
- - optimize_hyperparameters
|
| 47 |
+
- false
|
| 48 |
+
- - progress
|
| 49 |
+
- false
|
| 50 |
+
- - pruner
|
| 51 |
+
- median
|
| 52 |
+
- - sampler
|
| 53 |
+
- tpe
|
| 54 |
+
- - save_freq
|
| 55 |
+
- -1
|
| 56 |
+
- - save_replay_buffer
|
| 57 |
+
- false
|
| 58 |
+
- - seed
|
| 59 |
+
- 1567341068
|
| 60 |
+
- - storage
|
| 61 |
+
- null
|
| 62 |
+
- - study_name
|
| 63 |
+
- null
|
| 64 |
+
- - tensorboard_log
|
| 65 |
+
- runs/CarRacing-v3__ppo_lstm__1567341068__1754953879
|
| 66 |
+
- - track
|
| 67 |
+
- true
|
| 68 |
+
- - trained_agent
|
| 69 |
+
- ''
|
| 70 |
+
- - trial_id
|
| 71 |
+
- null
|
| 72 |
+
- - truncate_last_trajectory
|
| 73 |
+
- true
|
| 74 |
+
- - uuid
|
| 75 |
+
- false
|
| 76 |
+
- - vec_env
|
| 77 |
+
- dummy
|
| 78 |
+
- - verbose
|
| 79 |
+
- 1
|
| 80 |
+
- - wandb_entity
|
| 81 |
+
- frankcholula
|
| 82 |
+
- - wandb_project_name
|
| 83 |
+
- Flow Planner
|
| 84 |
+
- - wandb_tags
|
| 85 |
+
- []
|
config.yml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!!python/object/apply:collections.OrderedDict
|
| 2 |
+
- - - batch_size
|
| 3 |
+
- 128
|
| 4 |
+
- - clip_range
|
| 5 |
+
- 0.2
|
| 6 |
+
- - ent_coef
|
| 7 |
+
- 0.0
|
| 8 |
+
- - env_wrapper
|
| 9 |
+
- - rl_zoo3.wrappers.YAMLCompatResizeObservation:
|
| 10 |
+
shape:
|
| 11 |
+
- 64
|
| 12 |
+
- 64
|
| 13 |
+
- gymnasium.wrappers.transform_observation.GrayscaleObservation:
|
| 14 |
+
keep_dim: true
|
| 15 |
+
- - frame_stack
|
| 16 |
+
- 2
|
| 17 |
+
- - gae_lambda
|
| 18 |
+
- 0.95
|
| 19 |
+
- - gamma
|
| 20 |
+
- 0.99
|
| 21 |
+
- - learning_rate
|
| 22 |
+
- lin_1e-4
|
| 23 |
+
- - max_grad_norm
|
| 24 |
+
- 0.5
|
| 25 |
+
- - n_envs
|
| 26 |
+
- 8
|
| 27 |
+
- - n_epochs
|
| 28 |
+
- 10
|
| 29 |
+
- - n_steps
|
| 30 |
+
- 512
|
| 31 |
+
- - n_timesteps
|
| 32 |
+
- 4000000.0
|
| 33 |
+
- - normalize
|
| 34 |
+
- '{''norm_obs'': False, ''norm_reward'': True}'
|
| 35 |
+
- - policy
|
| 36 |
+
- CnnLstmPolicy
|
| 37 |
+
- - policy_kwargs
|
| 38 |
+
- dict(log_std_init=-2, ortho_init=False, enable_critic_lstm=False, activation_fn=nn.GELU,
|
| 39 |
+
lstm_hidden_size=128, )
|
| 40 |
+
- - sde_sample_freq
|
| 41 |
+
- 4
|
| 42 |
+
- - use_sde
|
| 43 |
+
- true
|
| 44 |
+
- - vf_coef
|
| 45 |
+
- 0.5
|
env_kwargs.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
render_mode: rgb_array
|
ppo_lstm-CarRacing-v3.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e230e2e9aea83f7d4c5e8e2d52805a46742592556c2ade128c7bbe7132721670
|
| 3 |
+
size 12057989
|
ppo_lstm-CarRacing-v3/_stable_baselines3_version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
2.7.0
|
ppo_lstm-CarRacing-v3/data
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ppo_lstm-CarRacing-v3/policy.optimizer.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:877919747695dff5aec22c5341dcfb493835dcbbf1832a4b6663eb8bcbc26424
|
| 3 |
+
size 7968056
|
ppo_lstm-CarRacing-v3/policy.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f01b12ceca96b2e1247ede1819873c6a5f5c1f60afb3f73f196ecf484d5cb1a4
|
| 3 |
+
size 3985267
|
ppo_lstm-CarRacing-v3/pytorch_variables.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07c7431cf6005e7d8f367d79e995f63e2f9b981a37e3437b795d058f9af4308b
|
| 3 |
+
size 1261
|
ppo_lstm-CarRacing-v3/system_info.txt
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- OS: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35 # 1 SMP Tue Nov 5 00:21:55 UTC 2024
|
| 2 |
+
- Python: 3.10.12
|
| 3 |
+
- Stable-Baselines3: 2.7.0
|
| 4 |
+
- PyTorch: 2.7.1+cu126
|
| 5 |
+
- GPU Enabled: True
|
| 6 |
+
- Numpy: 2.2.6
|
| 7 |
+
- Cloudpickle: 3.1.1
|
| 8 |
+
- Gymnasium: 1.2.0
|
replay.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4e929a8f9d1ba42e5bf95dcb5ff37a4538bbd5a504b9629cb20219e5ff5da3d
|
| 3 |
+
size 569728
|
results.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"mean_reward": 384.9226677, "std_reward": 161.14337186371696, "is_deterministic": true, "n_eval_episodes": 10, "eval_datetime": "2025-08-12T09:01:21.933603"}
|
train_eval_metrics.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:daa9e5b48b2ff85c579e37cc7ae2c17c9d9e17e2f5aae5de2d8882c16ad96487
|
| 3 |
+
size 133401
|
vec_normalize.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f7cdf31f713d2fdce49ce8434936eda5994c79f4fbece4bdc8aa3055d2fa057
|
| 3 |
+
size 50983
|