Skip to content

MLZOO-D: frontend, registry, and explainability polish (PRP-31) #256

@w7-mgfcode

Description

@w7-mgfcode

Surfaces the v0.2.16 advanced-model metadata (LightGBM / XGBoost / regression / prophet_like) in the React dashboard and registry surface.

Scope (per PRPs/PRP-31-mlzoo-d-frontend-registry-explainability.md)

  • Two new forecasting endpoints (read-only, additive, no Alembic migration):
    • GET /forecasting/runs/{run_id}/feature-metadata — keyed by registry UUID
    • GET /forecasting/jobs/{job_id}/feature-metadata — keyed by train-job ID (forecast.tsx only has the job ID; the train job's `result.run_id` is the artifact key, NOT a registry UUID — see memory `scenario-run-id-vs-registry-run-id`)
  • One computed `model_family` field on `RunResponse` — `baseline` / `tree` / `additive`, derived from `model_type` at serialization time. No DB column, no migration, no backfill.
  • One `FeatureImportancePanel` React component (one panel, `kind` discriminator for tree vs linear_coef).
  • In-place edits to 5 pages — runs explorer (`Family` badge column + family filter), run detail, run compare, forecast.tsx, backtest.tsx (allow-list-only extension).
  • New `UnprocessableEntityError` exception class in `app/core/exceptions.py` (code `UNPROCESSABLE_ENTITY`, distinct from `ValidationError`'s `VALIDATION_ERROR` — closes the `HTTPException(422)` anti-pattern from v0.2.16 PR feat(release): ship the MLZOO advanced ML model zoo (A–C2) to main (#252) #253).

Out of scope

  • No SHAP / LIME / permutation importance — only native `feature_importances_` and `coef_` from the fitted estimator.
  • No new agent-tool surface, no widening of `agent_require_approval`.
  • No DB migration.

PRP

`PRPs/PRP-31-mlzoo-d-frontend-registry-explainability.md` (v3, 24 tasks, conf 9.5/10 — `prp-quality-agent` verdict: READY).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions