Add Krea2 eval entry templates
This commit is contained in:
@@ -13,6 +13,7 @@ import argparse
|
||||
import json
|
||||
import random
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from dataclasses import dataclass, field
|
||||
@@ -7037,6 +7038,46 @@ def smoke_krea2_eval_log_policy() -> None:
|
||||
catalog_keys=set(krea2_pose_variant_catalog.variant_keys()),
|
||||
)
|
||||
_expect(any("unknown variant" in error for error in bad_variant_errors), "Krea2 eval validation should reject unknown variants")
|
||||
template = krea2_eval_log.entry_template(
|
||||
"pov_footjob_frontal_sole_stroke",
|
||||
seed=9102,
|
||||
source="smoke",
|
||||
date="2026-06-29",
|
||||
)
|
||||
_expect(template.get("variant_key") == "pov_footjob_frontal_sole_stroke", "Krea2 eval template lost variant key")
|
||||
_expect(template.get("seed") == 9102, "Krea2 eval template lost fixed seed")
|
||||
_expect(template.get("result") == "inconclusive", "Krea2 eval template should default to inconclusive")
|
||||
_expect(template.get("decision") == "needs_more_tests", "Krea2 eval template should default to needs_more_tests")
|
||||
_expect("footjob" in str(template.get("id") or ""), "Krea2 eval template id should include variant family")
|
||||
template_errors = krea2_eval_log.validate_entry(
|
||||
template,
|
||||
existing_entries=appended_log.get("entries") or [],
|
||||
catalog_keys=set(krea2_pose_variant_catalog.variant_keys()),
|
||||
)
|
||||
_expect(template_errors == [], f"Krea2 eval template should validate immediately: {template_errors}")
|
||||
cli_result = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
str(ROOT / "tools" / "krea2_record_eval.py"),
|
||||
"--print-template",
|
||||
"--variant-key",
|
||||
"pov_fingering_reclined_open_thighs",
|
||||
"--seed",
|
||||
"9103",
|
||||
"--source",
|
||||
"smoke",
|
||||
"--date",
|
||||
"2026-06-29",
|
||||
],
|
||||
cwd=str(ROOT),
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
_expect(cli_result.returncode == 0, f"Krea2 eval template CLI failed: {cli_result.stderr}")
|
||||
cli_template = json.loads(cli_result.stdout)
|
||||
_expect(cli_template.get("variant_key") == "pov_fingering_reclined_open_thighs", "Krea2 eval template CLI lost variant")
|
||||
_expect(cli_template.get("seed") == 9103, "Krea2 eval template CLI lost seed")
|
||||
|
||||
|
||||
def smoke_krea2_prompt_guide_policy() -> None:
|
||||
|
||||
Reference in New Issue
Block a user