File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,10 @@ def run(self):
181181 metrics_to_log [f"train/{ key } " ] = value .item ()
182182
183183 metrics_to_log ["train/lr" ] = lr * alpha
184- if self .logger :
184+
185+ # Logging only on the first worker in the dashboard.
186+ # Alternatively, you can use a distributed logger, or aggregate metrics from all workers.
187+ if self .logger and self .name == "worker_0" :
185188 for key , value in metrics_to_log .items ():
186189 self .logger .log_scalar (key , value , collected_frames )
187190 collector .shutdown ()
Original file line number Diff line number Diff line change 77# collector
88collector :
99 frames_per_batch : 800
10- total_frames : 40_000_000
10+ total_frames : 40_000_00
1111
1212# logger
1313logger :
1414 backend : wandb
15- project_name : torchrl_example_a2c
15+ project_name : torchrl_example_a3c
1616 group_name : null
17- exp_name : Atari_Schulman17
17+ exp_name : a3c_atari_training
1818 test_interval : 40_000_000
1919 num_test_episodes : 3
2020 video : False
You can’t perform that action at this time.
0 commit comments