Skip to content

Add 3-model Newton coverage across backends #272

Closed

Description

@neuromechanist

PR #271's review found that no backend exercises Newton with n_models=3 through the real M-step: torch's test_newton_multimodel_finite_and_shaped (tests/torch_tests/test_ng_backend.py:689) stops at n_models=2, the new MLX Newton tests likewise, and only the #267 numpy broadcast regression (tests/test_numpy_newton_multimodel.py) goes to 3 models, without cross-backend comparison. The curvature arrays are per-(source, model) and the direction/fallback logic loops over models, so 3-model coverage exercises index paths 2-model tests cannot distinguish from transposition errors.

Scope: one 3-model Newton fit test per backend (real sample EEG, finite params, non-degenerate stop, per-model posdef bookkeeping consistent), plus a cross-backend curvature comparison at matched state if cheap. Pre-existing gap on all backends, found during epic #260 Phase 3 (#264); kept out of PR #271 to keep the port reviewable.

Related: #264, #267, epic #260.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions