Commit a61d4b2
fix(actor): address PR #22 review — TD3 signature, tuple skip, docs, reset test
- learn_TD3 now accepts recurrent=False to match the DDPG/RDDPG signatures;
the learn_gsp dispatch was passing 3 positional args to a 2-arg method.
Latent bug today (GSP networks are built as DDPG/attention, not TD3) but
removes the footgun before the diagnostic batch exercises TD3 variants.
- TD3's non-actor-update step returns (0, 0); previously we unwrapped to
0.0 and logged it. That produces false collapse signals every
update_actor_iter-1 ticks. Now we skip the entry entirely — leave
last_gsp_loss at None as if no GSP step ran.
- Doc the semantic: last_gsp_loss is the GSP learner's training loss,
which is actor loss (policy-gradient signal) for DDPG/RDDPG/TD3 and
genuine MSE only for attention. For prediction-collapse detection
consumers should rely on gsp_squared_error and the HDF5Logger
episode-level gsp_output_std / gsp_pred_target_corr attrs.
- Add reset-between-ticks test covering the load-bearing invariant that
last_gsp_loss returns to None when a learn() call runs but no GSP
learning step fires.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9b38f30 commit a61d4b2
3 files changed
Lines changed: 39 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
452 | 461 | | |
453 | 462 | | |
454 | 463 | | |
455 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
456 | 468 | | |
457 | | - | |
| 469 | + | |
458 | 470 | | |
459 | 471 | | |
460 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
88 | 111 | | |
89 | 112 | | |
90 | 113 | | |
| |||
0 commit comments