Skip to content
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

[BugFix,Refactor] Dreamer refactor #1918

Merged
merged 125 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
a7b6d33
update config
BY571 Jan 25, 2024
171b15c
update dreamer utils
BY571 Feb 5, 2024
2f273a8
fixes
BY571 Feb 6, 2024
6856587
fix
BY571 Feb 6, 2024
578150e
flake
BY571 Feb 6, 2024
82fc9d8
update and add dense networks
BY571 Feb 8, 2024
0e48d9a
updates loss
BY571 Feb 9, 2024
e839dee
update losses
BY571 Feb 9, 2024
b555c9b
fixes
BY571 Feb 12, 2024
46e7234
test changes
BY571 Feb 13, 2024
12a594d
add eval env
BY571 Feb 14, 2024
0f21038
use independent normal + cleanup + dense encoder/decoder
BY571 Feb 15, 2024
fe65b95
cleanup
BY571 Feb 15, 2024
8adef8a
fixes
BY571 Feb 15, 2024
cc61cea
Merge branch 'main' into dreamer_v1_refactor
BY571 Feb 15, 2024
fb47a66
Merge branch 'main' into dreamer_v1_refactor
BY571 Feb 16, 2024
1faacc9
update naming
BY571 Feb 16, 2024
6a79e10
Merge branch 'main' into dreamer_v1_refactor
vmoens Apr 8, 2024
99e9c3c
amend
vmoens Apr 8, 2024
fbb09fa
amend
vmoens Apr 8, 2024
a7554c9
amend
vmoens Apr 8, 2024
ac5f2fa
amend
vmoens Apr 8, 2024
a912f7c
amend
vmoens Apr 8, 2024
74cf3f8
amend
vmoens Apr 8, 2024
47cfff7
amend
vmoens Apr 8, 2024
b8452e7
amend
vmoens Apr 8, 2024
2cb1b4a
amend
vmoens Apr 8, 2024
e81c9a5
amend
vmoens Apr 8, 2024
331faf4
amend
vmoens Apr 8, 2024
97b69d1
amend
vmoens Apr 8, 2024
36a672d
amend
vmoens Apr 8, 2024
f517e45
amend
vmoens Apr 8, 2024
c7c5d47
amend
vmoens Apr 8, 2024
0b8c7e7
amend
vmoens Apr 8, 2024
5ad1060
amend
vmoens Apr 8, 2024
140ad7b
amend
vmoens Apr 8, 2024
13f3e05
amend
vmoens Apr 8, 2024
c275594
amend
vmoens Apr 8, 2024
d02d1e3
amend
vmoens Apr 8, 2024
9a1f5ef
amend
vmoens Apr 8, 2024
acbeb51
amend
vmoens Apr 8, 2024
e22ba77
amend
vmoens Apr 8, 2024
83b2074
amend
vmoens Apr 8, 2024
87107db
amend
vmoens Apr 8, 2024
4ede077
amend
vmoens Apr 8, 2024
5c5529f
amend
vmoens Apr 8, 2024
0a795a4
amend
vmoens Apr 8, 2024
0ee83cd
amend
vmoens Apr 8, 2024
7c59b96
amend
vmoens Apr 8, 2024
07d3e93
amend
vmoens Apr 8, 2024
980a7ae
amend
vmoens Apr 8, 2024
2118821
amend
vmoens Apr 8, 2024
e85070f
amend
vmoens Apr 8, 2024
6b37329
amend
vmoens Apr 8, 2024
ac8f744
amend
vmoens Apr 8, 2024
9cc8445
amend
vmoens Apr 8, 2024
1c204f4
amend
vmoens Apr 8, 2024
0e4b1ee
amend
vmoens Apr 8, 2024
b0c9496
amend
vmoens Apr 8, 2024
1a4d979
amend
vmoens Apr 8, 2024
de47d0c
amend
vmoens Apr 8, 2024
19b04ac
amend
vmoens Apr 8, 2024
3d42352
amend
vmoens Apr 8, 2024
3fd1dfa
amend
vmoens Apr 8, 2024
31f8dbc
amend
vmoens Apr 8, 2024
f822901
amend
vmoens Apr 8, 2024
18ea308
amend
vmoens Apr 8, 2024
9660f51
amend
vmoens Apr 8, 2024
2ea1f90
amend
vmoens Apr 8, 2024
de49849
amend
vmoens Apr 8, 2024
15908b5
amend
vmoens Apr 8, 2024
0739aa0
amend
vmoens Apr 8, 2024
934b7f8
amend
vmoens Apr 8, 2024
0308fb4
amend
vmoens Apr 8, 2024
8015029
amend
vmoens Apr 8, 2024
b420c95
amend
vmoens Apr 8, 2024
f3c858e
amend
vmoens Apr 8, 2024
4d22121
amend
vmoens Apr 8, 2024
c4ccf0f
amend
vmoens Apr 8, 2024
a79f9b5
amend
vmoens Apr 8, 2024
4b02cb7
amend
vmoens Apr 8, 2024
b0adb46
amend
vmoens Apr 9, 2024
b8ec7b4
amend
vmoens Apr 9, 2024
b77f805
amend
vmoens Apr 9, 2024
49b0d7e
amend
vmoens Apr 9, 2024
32aa92c
amend
vmoens Apr 9, 2024
0d4ae71
amend
vmoens Apr 9, 2024
6124293
amend
vmoens Apr 9, 2024
c5071b3
amend
vmoens Apr 9, 2024
1017353
amend
vmoens Apr 9, 2024
5ada854
amend
vmoens Apr 9, 2024
de70612
amend
vmoens Apr 9, 2024
0dc1b08
amend
vmoens Apr 9, 2024
4149a87
amend
vmoens Apr 9, 2024
9fb63d4
amend
vmoens Apr 15, 2024
96ea263
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 15, 2024
5543761
amend
vmoens Apr 15, 2024
c12ed6f
Merge remote-tracking branch 'BY571/dreamer_v1_refactor' into dreamer…
vmoens Apr 15, 2024
1f78519
amend
vmoens Apr 17, 2024
93b1a51
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 17, 2024
e9b6ebc
amend
vmoens Apr 17, 2024
d881613
amend
vmoens Apr 17, 2024
449f962
amend
vmoens Apr 18, 2024
b2473aa
amend
vmoens Apr 18, 2024
6d8e006
amend
vmoens Apr 18, 2024
0a86244
Update torchrl/objectives/dreamer.py
vmoens Apr 18, 2024
dac6a36
lint
vmoens Apr 18, 2024
1315a4e
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 18, 2024
7d0a158
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 18, 2024
4451f63
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 18, 2024
7441f79
lint
vmoens Apr 18, 2024
4f374d9
lint
vmoens Apr 19, 2024
2dfa7ae
amend
vmoens Apr 19, 2024
4e74969
Update torchrl/objectives/dreamer.py
vmoens Apr 22, 2024
b36f86b
Update torchrl/objectives/dreamer.py
vmoens Apr 22, 2024
63f7580
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 22, 2024
46e8ac0
fix examples
vmoens Apr 22, 2024
e43aee4
amend
vmoens Apr 22, 2024
fd23a54
amend
vmoens Apr 22, 2024
dbc4954
Merge remote-tracking branch 'origin/main' into dreamer_v1_refactor
vmoens Apr 22, 2024
98d4020
init
vmoens Apr 22, 2024
a9e1cb0
amend
vmoens Apr 22, 2024
12db41f
amend
vmoens Apr 22, 2024
81ec41c
amend
vmoens Apr 23, 2024
7733c37
amend
vmoens Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 55 additions & 39 deletions examples/dreamer/config.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,55 @@
env_name: cheetah
env_task: run
env_library: dm_control
catframes: 1
async_collection: True
record_video: 0
frame_skip: 2
batch_size: 50
batch_length: 50
total_frames: 5000000
world_model_lr: 6e-4
actor_value_lr: 8e-5
from_pixels: True
# we want 50 frames / traj in the replay buffer. Given the frame_skip=2 this makes each traj 100 steps long
env_per_collector: 8
num_workers: 8
collector_device: cuda:1
model_device: cuda:0
frames_per_batch: 800
optim_steps_per_batch: 80
record_interval: 30
max_frames_per_traj: 1000
record_frames: 1000
batch_transform: 1
state_dim: 30
rssm_hidden_dim: 200
grad_clip: 100
grayscale: False
image_size : 64
buffer_size: 20000
init_env_steps: 1000
init_random_frames: 5000
logger: csv
offline_logging: False
project_name: torchrl_example_dreamer
normalize_rewards_online: True
normalize_rewards_online_scale: 5.0
normalize_rewards_online_decay: 0.99999
reward_scaling: 1.0
env:
name: cheetah
task: run
seed: 0
backend: dm_control
frame_skip: 2
from_pixels: True
grayscale: False
image_size : 64

collector:
total_frames: 5_000_000
init_random_frames: 1000
frames_per_batch: 1000
max_frames_per_traj: 1000
device: cpu

optimization:
train_every: 1000
grad_clip: 100
batch_size: 50
batch_length: 50

world_model_lr: 6e-4
actor_lr: 8e-5
value_lr: 8e-5
kl_scale: 1.0
free_nats: 3.0
optim_steps_per_batch: 80
gamma: 0.99
lambda: 0.95
imagination_horizon: 15

networks:
exploration_noise: 0.3
device: cuda:0
state_dim: 30
rssm_hidden_dim: 200
hidden_dim: 400
activation: "elu"


replay_buffer:
uint8_casting: True
buffer_size: 20000
batch_size: 50
scratch_dir: ${logger.exp_name}_${env.seed}

logger:
backend: wandb
project: dreamer-v1
exp_name: ${env.name}-${env.task}-${env.seed}
mode: online
eval_iter: 1000
eval_rollout_steps: 1000
Loading