fix(rewards): harden distributional value target projection

- Clamp HL-Gauss targets
- Handle terminal mask shapes safely
- Align the default smoothing ratio with Stop Regressing
This commit is contained in:
Khalil Meftah
2026-07-25 17:17:35 +02:00
parent b162e977c0
commit 64613d8f03
5 changed files with 77 additions and 17 deletions
@@ -133,3 +133,9 @@ def test_temporal_model_forward(monkeypatch):
eval_loss, eval_metrics = model(batch)
assert torch.isfinite(eval_loss)
assert -1.0 <= eval_metrics["predicted_value_mean"] <= 0.0
targets = model.compute_target_distribution(
torch.tensor([[-0.5], [-0.3]]),
torch.tensor([[False], [True]]),
)
assert targets.shape == (2, model.config.num_value_bins)