Skip to content

feat: log judge, target, and auditor model metadata in saved JSONs - #138

Merged
SushantGautam merged 1 commit into
mainfrom
fix/136-log-judge-target-meta
Nov 3, 2026
Merged

SushantGautam merged 1 commit into
mainfrom
fix/136-log-judge-target-meta

Conversation

@SushantGautam

Copy link
Copy Markdown
Collaborator

Summary

Fixes #136 — saved JSONs now include a meta field with judge, target, and auditor model metadata.

Changes

  • results.py — AuditResults accepts an optional meta dict, serializes it in to_dict(), and restores it in load().
  • model_auditor.py — New _run_meta() method builds the metadata dict (target_model, target_provider, judge_model, judge_provider, auditor_model, auditor_provider, max_turns, language, judge_name, scenario_pack).
  • single_turn.py — SingleTurnAuditor.run_async() passes meta (inherits _run_meta).
  • experiment.py — Retry-merge path preserves meta; judge_info dicts now include judge_name.
  • reframing.py — rejudge_async() carries source meta into rejudged results.

Example output

{
  "meta": {
    "target_model": "gpt-4o",
    "target_provider": "openai",
    "judge_model": "gpt-4o",
    "judge_provider": "openai",
    "auditor_model": "gpt-4o",
    "auditor_provider": "openai",
    "max_turns": 3,
    "language": "en",
    "judge_name": "checklist"
  },
  "results": [...]
}

Testing

All 1938 tests pass. Round-trip save/load verified.

)

Adds a 'meta' field to AuditResults.to_dict() output containing:
- target_model, target_provider
- judge_model, judge_provider
- auditor_model, auditor_provider
- max_turns, language
- judge_name (when a named judge is used)
- scenario_pack (when a string pack name is used)

The meta is populated by ModelAuditor._run_meta() and carried through:
- SingleTurnAuditor (inherits _run_meta)
- AuditExperiment retry-merge path
- rejudge_async (preserves source meta)

Round-trips correctly through save()/load().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 16:41
@SushantGautam
SushantGautam merged commit 007eaf4 into main Nov 3, 2026
8 checks passed
@SushantGautam
SushantGautam deleted the fix/136-log-judge-target-meta branch November 3, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

avalyset pushed a commit to avalyset/simpleaudit that referenced this pull request Nov 4, 2026
…imulaMet#136) (SimulaMet#138)

Adds a 'meta' field to AuditResults.to_dict() output containing:
- target_model, target_provider
- judge_model, judge_provider
- auditor_model, auditor_provider
- max_turns, language
- judge_name (when a named judge is used)
- scenario_pack (when a string pack name is used)

The meta is populated by ModelAuditor._run_meta() and carried through:
- SingleTurnAuditor (inherits _run_meta)
- AuditExperiment retry-merge path
- rejudge_async (preserves source meta)

Round-trips correctly through save()/load().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Log Judge, Target in JSONs

2 participants