Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dokimi/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ where the model decides to call a doc-search or skill tool (`agent:`,
The spec grammar — what an `--arms` entry means, where `+` splits a combined
spec, and what each arm is *named* — is `treatments/specs.py`.
`eval/arm_runner.py` generates and judges answers for every arm and reports
per-arm deltas vs a baseline. `dokimi/plugins.py` adds runtime plugins that
per-arm deltas vs a baseline. `eval/arms_run.py` runs it from an `ArmsRunConfig`,
the one typed run configuration `arms run`, `arms matrix-run` (one per cell) and
`subjects run` build from their flags. `dokimi/plugins.py` adds runtime plugins that
modify every arm inside one run (`plugin:caveman`): a plugin changes the system
prompt before the model runs or reshapes the answer after it. Entry point:
`python cli.py arms run`. Details in
Expand Down
1 change: 1 addition & 0 deletions dokimi/docs/evaluating-treatments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
depends_on:
- dokimi/dokimi/treatments/**
- dokimi/dokimi/commands/arms.py
- dokimi/dokimi/eval/arms_run.py
- dokimi/dokimi/schemas/arms.v1.json
- dokimi/dokimi/skills/loader.py
- dokimi/dokimi/agent_profiles/loader.py
Expand Down
415 changes: 77 additions & 338 deletions dokimi/dokimi/commands/arms.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dokimi/dokimi/commands/judge_reliability.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _check_judge_temperature(judges: list[tuple[str, str]], temperature) -> None
"""Exit 2 before any judgement when a (model, provider) judge rejects ``temperature``."""
if temperature is None:
return
from dokimi.commands.arms import _probe_sampling
from dokimi.eval.arms_run import probe_sampling
from dokimi.llm import unsupported_sampling_params
from dokimi.utils import bedrock_litellm_model

Expand All @@ -128,7 +128,7 @@ def _check_judge_temperature(judges: list[tuple[str, str]], temperature) -> None
try:
if unsupported_sampling_params(resolved, provider, temperature=temperature):
raise ValueError(f"provider '{provider}' does not support temperature for model '{model}'")
_probe_sampling(resolved, provider, temperature, None)
probe_sampling(resolved, provider, temperature, None)
except ValueError as exc:
print(f"Error: --judge-temperature {temperature} is rejected by judge {provider}/{model}: {exc}",
file=sys.stderr)
Expand Down
21 changes: 5 additions & 16 deletions dokimi/dokimi/commands/subjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ def cmd_subjects_show(args: argparse.Namespace) -> None:
def cmd_subjects_run(args: argparse.Namespace) -> None:
"""Run awareness matrix cells for one subject and write a scorecard."""
from dokimi.artifacts import load_artifact, save_artifact
from dokimi.commands.arms import (
_safe_name,
cmd_arms_matrix_run,
forwarded_run_config,
)
from dokimi.commands.arms import _safe_name, run_config_from_args, run_matrix
from dokimi.report.subject_report import render_subject_scorecard
from dokimi.subjects import build_subject_scorecard, load_subject
from dokimi.subjects.loader import awareness_arm_specs
Expand Down Expand Up @@ -137,19 +133,12 @@ def cmd_subjects_run(args: argparse.Namespace) -> None:
run_dir = out_dir / _safe_name(product)
rollup_json = run_dir / "matrix-rollup.json"
rollup_md = run_dir / "matrix-rollup.md"
run_args = argparse.Namespace(
product=product,
questions=questions_path,
arms=",".join(awareness_arm_specs(descriptor)),
matrix_cells=str(matrix_path),
matrix_cell=None,
out_dir=str(run_dir),
out_json=str(rollup_json),
out_md=str(rollup_md),
run_matrix(
run_config_from_args(args, product=product, baseline_arm=baseline_arm),
arms=",".join(awareness_arm_specs(descriptor)), questions=questions_path,
matrix_cells=str(matrix_path), out_dir=run_dir, out_json=rollup_json, out_md=rollup_md,
plugin_deltas=not args.no_plugin_deltas,
**forwarded_run_config(args, plugins="", baseline_arm=baseline_arm),
)
cmd_arms_matrix_run(run_args)
awareness_runs.append({
"product": product,
"questions": questions_path,
Expand Down
Loading
Loading