Skip to content

Commit 19b7ed2

Browse files
charlesblucaclaude
andcommitted
fix(harness): preserve run_name and artifact_dir on _run_entry result
slack.py and reporting.py read these top-level keys from session summary entries. artifact_dir is required to locate results.json for Slack posts; run_name is used for summary tables. dataset/preset fall back to test_config so they don't need explicit augmentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1a6310f commit 19b7ed2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

nemo_retriever/src/nemo_retriever/harness/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ def _run_entry(
541541
resolved_run_name = run_name or cfg.dataset_label
542542
normalized_tags = _normalize_tags(tags)
543543
result = _run_single(cfg, artifact_dir, run_id=resolved_run_name, tags=normalized_tags)
544+
result["run_name"] = resolved_run_name
545+
result["artifact_dir"] = str(artifact_dir.resolve())
544546
return result
545547

546548

nemo_retriever/tests/test_harness_run.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,7 @@ def test_run_entry_session_artifact_dir_uses_run_name(monkeypatch, tmp_path: Pat
322322
)
323323
monkeypatch.setattr(harness_run, "load_harness_config", lambda **_: cfg)
324324

325-
captured_artifact_dir: list[Path] = []
326-
327325
def _fake_run_single(_cfg: HarnessConfig, _artifact_dir: Path, run_id: str, tags: list[str] | None = None) -> dict:
328-
captured_artifact_dir.append(_artifact_dir)
329326
assert tags == []
330327
return {
331328
"success": True,
@@ -336,15 +333,15 @@ def _fake_run_single(_cfg: HarnessConfig, _artifact_dir: Path, run_id: str, tags
336333

337334
monkeypatch.setattr(harness_run, "_run_single", _fake_run_single)
338335

339-
harness_run._run_entry(
336+
result = harness_run._run_entry(
340337
run_name="jp20_single",
341338
config_file=None,
342339
session_dir=tmp_path,
343340
dataset="jp20",
344341
preset="single_gpu",
345342
)
346343

347-
assert captured_artifact_dir[0].name == "jp20_single"
344+
assert Path(result["artifact_dir"]).name == "jp20_single"
348345

349346

350347
def test_run_entry_returns_tags(monkeypatch, tmp_path: Path) -> None:

0 commit comments

Comments
 (0)