Repository navigation
Description
Summary
The run history guide gives users an incorrect lookup for generated questions. Garbage collection can also select a run when its purported saved baseline is invalid, leaving users without the protection they requested.
Scenarios (2)
1. docs/runs.md gives the wrong runs list subject for generated question sets
onetbb.json holds the generated rows from tests/fixtures/artifacts/questions.v2.json, saved with product="onetbb" through the same writer as eval questions generate. On 9bf1ce70, runs list --kind questions --subject onetbb --json exits 0 and returns one row with subject set to onetbb. docs/runs.md:55 says the set has no product and shows - as its subject.
(
set -e
cd dokimi
runs=$(mktemp -d)
LITELLM_LOCAL_MODEL_COST_MAP=True python - "$runs" <<'PY'
import json
import sys
from pathlib import Path
from dokimi.questions.llm_gen import QuestionGenerator
fixture = Path("tests/fixtures/artifacts/questions.v2.json")
rows = json.loads(fixture.read_text())["questions"]
out = Path(sys.argv[1]) / "onetbb.json"
generator = QuestionGenerator(model="gpt-4o-mini", provider="openai")
generator.save_questions(
[row for row in rows if row["source_type"] == "generated"],
out,
product="onetbb",
)
PY
DOKIMI_RUNS_DIR="$runs" python cli.py runs list --kind questions --subject onetbb --json
)2. runs gc --keep-baselines selects a run when its saved eval copy contains []
baselines/eval/onetbb-gpt55-docs.json holds the saved eval for 20261028T093512Z-77c2e0b4 before its contents are replaced with []. On 9bf1ce70, runs gc --older-than 30d --keep-baselines --dry-run keeps the run with the intact copy. With [] in the saved copy, the same command exits 0 and prints would remove 1 run older than 30d under results/. I expected exit 2 and a message naming the saved copy because the array cannot identify the run it holds, as described in docs/runs.md:202.
(
set -e
cd dokimi
project=$PWD
scratch=$(mktemp -d)
cd "$scratch"
python - "$project" <<'PY'
import json
import sys
from pathlib import Path
source = Path(sys.argv[1]) / "tests/fixtures/artifacts/eval.v1.json"
data = json.loads(source.read_text())
target = Path("results/onetbb_sol/eval/onetbb.json")
target.parent.mkdir(parents=True)
target.write_text(json.dumps({
"schema_version": "eval.v1", **data,
"run_id": "20261028T093512Z-77c2e0b4",
"evaluated_at": "2020-01-01T00:00:00Z",
}) + "\n")
PY
python "$project/cli.py" baseline save \
--from-eval results/onetbb_sol/eval/onetbb.json --name onetbb-gpt55-docs
DOKIMI_RUNS_DIR=results python "$project/cli.py" runs gc \
--older-than 30d --keep-baselines --dry-run
printf '%s\n' '[]' > baselines/eval/onetbb-gpt55-docs.json
DOKIMI_RUNS_DIR=results python "$project/cli.py" runs gc \
--older-than 30d --keep-baselines --dry-run
)Related
- runs list and show disagree with documented artifact display and lookup #972: same page
docs/runs.md; same commanddokimi runs list(closed by fix(runs): a text file named like a run_id no longer hides the run (#972) #976) - eval questions generate reports success when a local doc source is missing #1086: same command
dokimi eval questions(closed by fix(cli): refuse a missing local doc source in questions generate #1108)
Activity