Add --comment option to predict, recorded in YAML sidecar
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,25 @@ def test_ref_yaml_contains_expected_fields(tmp_path):
|
||||
assert data["dataset"] == str(dataset)
|
||||
assert data["checkpoint"] == str(checkpoint.resolve())
|
||||
assert "timestamp" in data
|
||||
assert "comment" not in data
|
||||
|
||||
|
||||
def test_ref_yaml_includes_comment_when_provided(tmp_path):
|
||||
ckpt_dir = tmp_path / "checkpoints"
|
||||
ckpt_dir.mkdir()
|
||||
checkpoint = ckpt_dir / "best.pt"
|
||||
checkpoint.touch()
|
||||
|
||||
out = tmp_path / "pred.parquet"
|
||||
dataset = tmp_path / "full.manifest"
|
||||
pred_uuid = str(uuid.uuid4())
|
||||
|
||||
ref_path = _write_prediction_ref(
|
||||
checkpoint, pred_uuid, out, dataset, comment="baseline sweep run 3"
|
||||
)
|
||||
data = yaml.safe_load(ref_path.read_text())
|
||||
|
||||
assert data["comment"] == "baseline sweep run 3"
|
||||
|
||||
|
||||
def test_ref_timestamp_is_iso_format(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user