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
{{ message }}
Repository navigation
AMICA_NumPy long fit hits non-finite likelihood (NaN) ~iter 687 on sample data #39
Surfaced while fixing #30. With the CLI save/load format fixed, test_sample_data_cli (the full 2000-iter CLI run on the sample data with sample_params.json: do_newton=true, newt_start=50) now gets past the format step but the NumPy backend diverges to a non-finite log-likelihood:
Non-finite likelihood (NaN/-inf) encountered
Optimization finished after 687 iterations
The fit stops early at ~iter 687 and the degraded result no longer Hungarian-matches the Fortran reference (correlation < 0.8), so the integration test fails on AssertionError: Some components don't match original results.
This is distinct from #30 (format) and from the parity work: at ~150 iterations the NumPy backend is stable and matches Fortran (test_sample_data_numpy_vs_fortran and the #37 NumPy<->NG parity test both pass at 150 iters, ~0.997/1.0 correlation). The instability appears only in the longer run.
Scope
Reproduce and localize the NaN (likely an unclipped gradient / zero-denominator / Newton-step blow-up in the long run; see .context/scratch_history.md NaN notes).
The torch AMICATorchNG backend runs the same update math without this blow-up on the sample data, so the NG path is a useful diff reference.
Once fixed, un-xfail test_sample_data_cli.
Note: AMICATorchNG (the default backend) is unaffected; this is specific to the legacy NumPy long fit.
Activity
Re-xfail test_sample_data_cli for the NaN instability (#39)
Address PR #40 review: final write, value asserts, CLI test
Add restart-on-NaN mechanism to NumPy backend (#39)
Re-xfail CLI test for the #41 long-run drift
Merge pull request #42 from neuromechanist/39-amica_numpy-long-fit-hi…