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
MLX linalg failure aborts the process instead of raising #274
Found while verifying PR #271's W finiteness guard: when AMICAMLXNG's _update_unmixing_matrices hits a genuinely singular A, MLX 0.32's CPU-stream mx.linalg.inv does not raise a Python exception — LAPACK LU failure terminates the whole process (libc++abi: [Inverse::eval_cpu] LU factorization failed), and a try/except around fit() cannot catch it. The torch backend raises a catchable error in the same situation. Attempts to reach a float32 inf overflow via near-singular A instead hit this abort first, so the new W/_logdet_W finiteness guard is defense-in-depth rather than a reachable-overflow catch (documented in the PR).
Scope: decide a containment for the MLX backend — e.g. a cheap host-side conditioning check (finite slogdet magnitude, or np.linalg.cond on the small per-model matrix) before calling mx.linalg.inv, failing with a Python RuntimeError naming the model and iteration; or track upstream MLX behavior and document the limitation in docs/guides/amica-differences.md. Pre-existing behavior, not introduced by #264/#271.
Activity
Guard MLX unmixing inversion against process abort
Document the MLX inversion guard
Guard MLX unmixing inversion against process abort (#293)
Add OOM-safe block-size auto-tuner (#296)
Set stop_reason before every mid-loop invariant raise