← Back to Pull requests

Update OSFT notebook: benchmark evals and MLflow tracking #68

Closed
unknown closed this pull request without merging on Jun 03, 2026 00:24 UTC
View on GitHub
unknown unknown commented on May 06, 2026 21:05 UTC
Author

Summary

  • Replace ad-hoc science questions with standard benchmarks (MMLU, IFEval, GPQA Diamond) using lm-evaluation-harness for rigorous knowledge retention measurement

  • Add MLflow experiment tracking with pre-filled configuration for demo purposes
  • Changes

    Benchmark Evaluation


  • Removed the two "science question" cells that tested knowledge retention with free-form Q&A

  • Added lm-evaluation-harness based evaluation comparing base model vs OSFT-trained model

  • Evaluates on MMLU (broad knowledge), IFEval (instruction following), and GPQA Diamond (deep science reasoning)

  • Produces a comparison table with per-benchmark scores and delta
  • MLflow Integration


  • New markdown cell with instructions for launching an MLflow server

  • New code cell with pre-filled MLflow configuration (URI, experiment name, run name)

  • MLflow params (mlflow_tracking_uri, mlflow_experiment_name, mlflow_run_name) added to the osft() training call

  • Training metrics logged automatically when MLflow server is running
  • Updated Summary


  • Final analysis references benchmark results and MLflow tracking instead of ad-hoc science questions
  • Dependencies

    The notebook now requires:

  • lm-eval (pip install lm-eval) for benchmark evaluation

  • mlflow (pip install mlflow) for experiment tracking (optional — training works without it)
  • Test plan

  • Verify notebook cells render correctly in Jupyter

  • Run MLflow cell configuration (no server needed for syntax check)

  • Run eval cell against a small model to verify lm-eval integration
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    MLflow experiment tracking added to the notebook with run reporting and checkpoint location output
    Benchmark-driven evaluation comparing base vs tuned models on MMLU, IFEval, and GPQA Diamond with per-task deltas and an overall retention verdict (≥95%)

    Bug Fixes / Improvements
    Training runs capture stdout/stderr to prevent notebook crashes; clearer startup and duration messages

    Documentation
    * Notebook updated with end-to-end training, MLflow setup, evaluation flow, and JSON-formatted final analysis

    ![Review Change Stack](https://app.coderabbit.ai/change-stack/Red-Hat-AI-Innovation-Team/training_hub/pull/68)
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 321 lines (+240 / -81) across 4 files Reviewer: RobotSail Review duration: 39079m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 321 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.345
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #68"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.9% (MEDIUM) · Higher = larger blast radius
    41.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.6% · Safe to merge
    16.6%