Chris1 commited on
Commit
bbd4f9d
1 Parent(s): d095a24

Initial commit

Browse files
.gitattributes CHANGED
@@ -29,3 +29,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zstandard filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zstandard filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
32
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: stable-baselines3
3
+ tags:
4
+ - CarRacing-v0
5
+ - deep-reinforcement-learning
6
+ - reinforcement-learning
7
+ - stable-baselines3
8
+ model-index:
9
+ - name: PPO
10
+ results:
11
+ - metrics:
12
+ - type: mean_reward
13
+ value: 205.45 +/- 120.65
14
+ name: mean_reward
15
+ task:
16
+ type: reinforcement-learning
17
+ name: reinforcement-learning
18
+ dataset:
19
+ name: CarRacing-v0
20
+ type: CarRacing-v0
21
+ ---
22
+
23
+ # **PPO** Agent playing **CarRacing-v0**
24
+ This is a trained model of a **PPO** agent playing **CarRacing-v0**
25
+ using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3)
26
+ and the [RL Zoo](https://github.com/DLR-RM/rl-baselines3-zoo).
27
+
28
+ The RL Zoo is a training framework for Stable Baselines3
29
+ reinforcement learning agents,
30
+ with hyperparameter optimization and pre-trained agents included.
31
+
32
+ ## Usage (with SB3 RL Zoo)
33
+
34
+ RL Zoo: https://github.com/DLR-RM/rl-baselines3-zoo<br/>
35
+ SB3: https://github.com/DLR-RM/stable-baselines3<br/>
36
+ SB3 Contrib: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib
37
+
38
+ ```
39
+ # Download model and save it into the logs/ folder
40
+ python -m utils.load_from_hub --algo ppo --env CarRacing-v0 -orga Chris1 -f logs/
41
+ python enjoy.py --algo ppo --env CarRacing-v0 -f logs/
42
+ ```
43
+
44
+ ## Training (with the RL Zoo)
45
+ ```
46
+ python train.py --algo ppo --env CarRacing-v0 -f logs/
47
+ # Upload the model and generate video (when possible)
48
+ python -m utils.push_to_hub --algo ppo --env CarRacing-v0 -f logs/ -orga Chris1
49
+ ```
50
+
51
+ ## Hyperparameters
52
+ ```python
53
+ OrderedDict([('batch_size', 128),
54
+ ('clip_range', 0.2),
55
+ ('ent_coef', 0.0),
56
+ ('env_wrapper',
57
+ [{'utils.wrappers.FrameSkip': {'skip': 2}},
58
+ {'gym.wrappers.resize_observation.ResizeObservation': {'shape': 64}},
59
+ {'gym.wrappers.gray_scale_observation.GrayScaleObservation': {'keep_dim': True}}]),
60
+ ('frame_stack', 2),
61
+ ('gae_lambda', 0.95),
62
+ ('gamma', 0.99),
63
+ ('learning_rate', 'lin_1e-4'),
64
+ ('max_grad_norm', 0.5),
65
+ ('n_envs', 8),
66
+ ('n_epochs', 10),
67
+ ('n_steps', 512),
68
+ ('n_timesteps', 4000000.0),
69
+ ('normalize', "{'norm_obs': False, 'norm_reward': True}"),
70
+ ('policy', 'CnnPolicy'),
71
+ ('policy_kwargs',
72
+ 'dict(log_std_init=-2, ortho_init=False, activation_fn=nn.GELU, '
73
+ 'net_arch=[dict(pi=[256], vf=[256])], )'),
74
+ ('sde_sample_freq', 4),
75
+ ('use_sde', True),
76
+ ('vf_coef', 0.5),
77
+ ('normalize_kwargs', {'norm_obs': False, 'norm_reward': False})])
78
+ ```
args.yml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !!python/object/apply:collections.OrderedDict
2
+ - - - algo
3
+ - ppo
4
+ - - device
5
+ - auto
6
+ - - env
7
+ - CarRacing-v0
8
+ - - env_kwargs
9
+ - null
10
+ - - eval_episodes
11
+ - 10
12
+ - - eval_freq
13
+ - 10000
14
+ - - gym_packages
15
+ - []
16
+ - - hyperparams
17
+ - null
18
+ - - log_folder
19
+ - logs
20
+ - - log_interval
21
+ - -1
22
+ - - max_total_trials
23
+ - null
24
+ - - n_eval_envs
25
+ - 1
26
+ - - n_evaluations
27
+ - null
28
+ - - n_jobs
29
+ - 1
30
+ - - n_startup_trials
31
+ - 10
32
+ - - n_timesteps
33
+ - -1
34
+ - - n_trials
35
+ - 500
36
+ - - no_optim_plots
37
+ - false
38
+ - - num_threads
39
+ - -1
40
+ - - optimization_log_path
41
+ - null
42
+ - - optimize_hyperparameters
43
+ - false
44
+ - - pruner
45
+ - median
46
+ - - sampler
47
+ - tpe
48
+ - - save_freq
49
+ - -1
50
+ - - save_replay_buffer
51
+ - false
52
+ - - seed
53
+ - 3969982923
54
+ - - storage
55
+ - null
56
+ - - study_name
57
+ - null
58
+ - - tensorboard_log
59
+ - ''
60
+ - - track
61
+ - false
62
+ - - trained_agent
63
+ - ''
64
+ - - truncate_last_trajectory
65
+ - true
66
+ - - uuid
67
+ - false
68
+ - - vec_env
69
+ - dummy
70
+ - - verbose
71
+ - 1
72
+ - - wandb_entity
73
+ - null
74
+ - - wandb_project_name
75
+ - sb3
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
+ - - utils.wrappers.FrameSkip:
10
+ skip: 2
11
+ - gym.wrappers.resize_observation.ResizeObservation:
12
+ shape: 64
13
+ - gym.wrappers.gray_scale_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
+ - CnnPolicy
37
+ - - policy_kwargs
38
+ - dict(log_std_init=-2, ortho_init=False, activation_fn=nn.GELU, net_arch=[dict(pi=[256],
39
+ vf=[256])], )
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
+ {}
ppo-CarRacing-v0.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fabb83aa85d2f5473c59773041fe38a4c884be6918f9d89b665806612d1fdfc
3
+ size 10489345
ppo-CarRacing-v0/_stable_baselines3_version ADDED
@@ -0,0 +1 @@
 
 
1
+ 1.6.0
ppo-CarRacing-v0/data ADDED
The diff for this file is too large to render. See raw diff
 
ppo-CarRacing-v0/policy.optimizer.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a248ca685bd6315971a2cc7ed58ba9055b2bc815344a9f3e77de4229ad488d4
3
+ size 6919116
ppo-CarRacing-v0/policy.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a619aebae97e22c8ae784a17266b7ff7e3cae092e81d7faeef64f5dfb2912b2f
3
+ size 3458290
ppo-CarRacing-v0/pytorch_variables.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d030ad8db708280fcae77d87e973102039acd23a11bdecc3db8eb6c0ac940ee1
3
+ size 431
ppo-CarRacing-v0/system_info.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ OS: Linux-5.15.0-41-generic-x86_64-with-glibc2.29 #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022
2
+ Python: 3.8.10
3
+ Stable-Baselines3: 1.6.0
4
+ PyTorch: 1.12.0+cu113
5
+ GPU Enabled: True
6
+ Numpy: 1.23.1
7
+ Gym: 0.21.0
replay.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ecd80473e2f77555be3f3d53d393ee24ebb07a3fe377dc0c27bee5e91d8300ec
3
+ size 722576
results.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"mean_reward": 205.44836270000002, "std_reward": 120.64574667987408, "is_deterministic": true, "n_eval_episodes": 10, "eval_datetime": "2022-07-25T22:26:00.735175"}
train_eval_metrics.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f681d5edf008e282d98ebeeda71464645dd898554f96ee6699acd8c64c4cfe6
3
+ size 303758
vec_normalize.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2999f7e591bea179590b6118bec575a6c7aabc30610127a2ef8588930180b93e
3
+ size 53129