You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional W&B logging to Atari DQN and PPO (#126)
* Add optional W&B logging to Atari PPO
New --wandb CLI flag (in shared parse_args) initializes a wandb run and
logs recent_mean_return, policy_loss, value_loss, and entropy keyed by
global_step. Off by default so non-wandb users see no behavior change.
wandb added to dependencies via uv.
* Gitignore wandb run dir and document --wandb usage
Add wandb/ to .gitignore so local run artifacts don't get committed, and
add a short Logging section to the README covering 'wandb login' and
the --wandb flag. The flag is opt-in and per-user (W&B login is tied to
your own account), so contributors who skip it don't need the package
at runtime.
* Add optional W&B logging to Atari DQN
Same --wandb pattern as PPO: logs recent_mean_return, epsilon, last loss,
and buffer size every 10k frames into project rl-atari-dqn. Off by
default so non-wandb users see no change. README updated to cover both
Atari scripts.
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,18 @@ cd 2-cartpole && uv run python 1-dqn.py --render
45
45
cd 2-cartpole && uv run python 1-dqn.py --test
46
46
```
47
47
48
+
### Logging to Weights & Biases (Atari only)
49
+
50
+
Both Atari scripts (`1-dqn.py`, `2-ppo.py`) can stream training metrics to your own [Weights & Biases](https://wandb.ai/) account. One-time login, then pass `--wandb`:
51
+
52
+
```bash
53
+
uv run wandb login # paste the API key from https://wandb.ai/authorize
54
+
cd 3-atari && uv run python 2-ppo.py --env breakout --wandb
55
+
cd 3-atari && uv run python 1-dqn.py --env breakout --wandb
56
+
```
57
+
58
+
Runs land in *your*`rl-atari-ppo` / `rl-atari-dqn` project — nothing is shared by default. Omit `--wandb` and the script runs without ever touching the network.
0 commit comments