Skip to content

architecture: make JMLE optimization and MMLE runtime fail closed on Rust #626

Description

@seonghobae

Production numerical ownership contract

JMLE production optimization must have one numerical owner. Python may validate, pack/unpack parameters, manage deterministic restarts, evaluate the model objective/gradient callback, construct results and retain explicit reference/test formulas. Adam moments/update arithmetic, L-BFGS history/two-loop/curvature/line-search behavior, optimizer phase sequencing, and result-affecting convergence control for backend="rust" belong in mlsirm-core/PyO3. Missing/incompatible Rust capability must fail closed.

Protected-main state — 2026-08-12

Fresh protected main: c91ae210bc8e0340a5b0587cf5289b82a2e8ab92.

Protected main already contains the accepted Rust/PyO3 ownership migration for advertised JMLE optimizer modes:

  • backend="auto" fails closed when the compiled Rust core is unavailable rather than silently selecting NumPy;
  • the legacy plain unidimensional public MMLE NumPy production fallback is removed; and
  • public JMLE backend="rust" routes Adam, L-BFGS and adam_lbfgs sequencing through compiled jmle_optimize* entrypoints rather than the legacy Python _adam/_lbfgs loops.

Historical #751/#744/#738/#760 head/check identities are lineage only and do not transfer to current work.

Current recovery/convergence lane

Draft PR #770 is the active scientific acceptance slice. At this update its exact head is 503564b57ecf7ba504557399a3343f6dd203601e, but it is stacked on predecessor branch codex/fast-judge-accepted-type-regression at the older snapshot 11291fd5f03cf24e403289b0466a7b633d0d3971 rather than the predecessor's current head.

#770 adds a Rust L-BFGS convergence correction plus deterministic public-path recovery evidence for adam, lbfgs, and adam_lbfgs using aligned discrimination/easiness/theta bias/MAE/RMSE and explicit convergence evidence. Its prior stacked-head CI/ClusterFuzzLite success is useful lineage but is not merge evidence after the predecessor moved.

The current #778 predecessor is the repository's baseline documentation/fit-statistics correction line. It must integrate or become otherwise stable first; no predecessor check/review transfers into a refreshed #770.

What remains before closure

  1. Integrate/stabilize the current test(judge): close accepted-type and ownership gaps #778 predecessor under live repository policy, then reconcile only fix(jmle): recognize objective convergence and add recovery evidence #770's unique optimizer/recovery delta onto the resulting exact lineage without destructive rebase/force-push.
  2. Regenerate every base-sensitive Python 3.12/3.14, Rust/PyO3, package/reinstall, GPU-existing/fuzz, Security/SAST and current-head review gate on one unchanged refreshed fix(jmle): recognize objective convergence and add recovery evidence #770 head/current live base.
  3. Preserve the ownership sentinel proving backend="rust" reaches zero legacy Python _adam/_lbfgs calls for all advertised optimizer modes.
  4. Preserve optimizer identities, objective/gradient estimand, seed/restart semantics, traces/statuses and fail-closed behavior unless a separate scientific correction is reviewed test-first.
  5. Require realistic aligned true-parameter recovery for Adam, L-BFGS and adam_lbfgs; ordinary fit-suite GREEN or correlation alone is insufficient.
  6. Treat the finite deterministic recovery thresholds as scoped evidence, not a universal accuracy guarantee. Expand scenario/Monte Carlo coverage before broader claims.
  7. Benchmark before adding an end-to-end GPU optimizer path; existing GPU objective/gradient parity is not optimizer parity.
  8. Keep canonical Architecture/TRD/ADR/UML/ERD/traceability synchronized only through the sole docs: close canonical documentation fitness gaps without parallel authority #621/test(judge): close accepted-type and ownership gaps #778 documentation authority (or its explicit successor).

Non-goals

  • no new estimator/model family merely for ownership convergence;
  • no SciPy or hidden Python optimizer fallback;
  • no hosted service/database change;
  • no weakening of recovery, security or package gates.

Closure

Close only when the refreshed optimizer-mode recovery/convergence slice is integrated on protected main with current package/security evidence and the scientific recovery evidence relevant to the public claim is accepted. The Rust/PyO3 source ownership migration itself is already integrated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions