Skip to content

feat(owner_eval): standalone owner eval pipeline (GSM8K/MMLU/PPL -> P… - #168

Open
present42 wants to merge 2 commits into
masterfrom
feat/owner-eval-pipeline
Open

feat(owner_eval): standalone owner eval pipeline (GSM8K/MMLU/PPL -> P…#168
present42 wants to merge 2 commits into
masterfrom
feat/owner-eval-pipeline

Conversation

@present42

Copy link
Copy Markdown
Contributor

…rometheus)

feat(owner_eval): standalone owner eval pipeline (GSM8K / MMLU / PPL → Prometheus)

Summary

Adds connito.owner_eval, a daemon the subnet owner runs independently of any
miner or validator. Every N cycles it loads the latest merged full model and runs
a pluggable benchmark suite — GSM8K perplexity, GSM8K task accuracy, MMLU
accuracy — publishing the results as Prometheus metrics for the leaderboard
backend to scrape.

Today the only signal is validator scoring's relative (baseline_loss − val_loss)
deltas per miner; there's no independent, absolute view of how good the
collectively-trained model actually is on real benchmarks. This fills that gap.

What's added

  • Evaluator registry (registry.py) — add a metric by dropping a file in
    metrics/, decorating with @register, and listing its name in config. Each
    evaluator returns dict[str, float], so one can emit several scalars.
  • Three metrics (metrics/): gsm8k_ppl (reuses
    shared/evaluate.evaluate_model), gsm8k_task (greedy generation + numeric
    extraction), mmlu (per-choice log-likelihood argmax, seeded representative
    sampling across all 57 subjects).
  • Cycle-gated daemon (run.py) — polls the cycle API (get_phase_from_api),
    runs when cycle_index % N == 0. --once / OWNER_EVAL_FORCE_RUN for
    one-shot; deferred heavy imports keep the gate unit-testable.
  • Model source (bootstrap.py) — chain (read-only fetch of the latest
    validator HF checkpoint via load_model, no wallet keys required) or
    base (pretrained model, wallet-free canary).
  • ConfigEvalPipelineCfg + OwnerEvalConfig in shared/config.py
    (model_source, n_samples_per_metric, eval_interval_cycles,
    telemetry_port, sample_seed).
  • Telemetryowner_eval_metric{metric}, owner_eval_status{metric},
    owner_eval_run_info{model_revision,cycle_index},
    owner_eval_last_run_timestamp, owner_eval_loop_heartbeat_total +
    best-effort helpers in shared/telemetry.py; mycelia_owner_eval scrape job
    in observability/prometheus.yml.
  • Docsconnito/owner_eval/OBSERVABILITY.md: how the backend API consumes
    the metrics (PromQL recipes, response shapes, alerts).
  • Console script weightnet-owner-eval; example owner_eval.canary.yaml.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants