Files
giant/tests
lars d0381728ee
CI / Format (ruff format) (push) Failing after 27s
CI / Lint (ruff check) (push) Successful in 28s
CI / Sync project version with tag (push) Has been skipped
CI / Type check (ty) (push) Successful in 24s
CI / Tests (push) Successful in 1m11s
Fix negative secondary mass crashing log_transform during rollout
decode_secondaries() applied inv_log_transform() to the model's raw
predicted log_mass directly. Since that value isn't itself the output
of log_transform, exp(log_mass) can undershoot _EPS, making
inv_log_transform(log_mass) = exp(log_mass) - _EPS go slightly
negative. Once that secondary spawns a track and its mass is fed back
in as conditioning for a further rollout step, log_transform(mass)
computes log(mass + eps) with mass <= -eps, producing a non-finite
value and raising.

Clip log_mass to log(_EPS) before inverting so the resulting mass is
guaranteed >= 0 (matching the invariant the surrounding comment
already assumed, but didn't enforce).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 12:08:26 +02:00
..