fix(logs): fixing logs on hf-jobs

This commit is contained in:
CarolinePascal
2026-07-30 17:02:41 +02:00
parent 640096e0d9
commit a4179dd6a1
@@ -33,6 +33,7 @@ Examples:
uv run lerobot-curate-cameras --repo_id=user/dataset --mode=rename --job.target=h200 uv run lerobot-curate-cameras --repo_id=user/dataset --mode=rename --job.target=h200
""" """
import json
import logging import logging
import shutil import shutil
import tempfile import tempfile
@@ -229,6 +230,13 @@ def curate_cameras(cfg: CameraCurationConfig) -> None:
logger.info("curate-cameras: report written to %s", report_path) logger.info("curate-cameras: report written to %s", report_path)
logger.info("curate-cameras: proposed rename mapping: %s", mapping or "(none)") logger.info("curate-cameras: proposed rename mapping: %s", mapping or "(none)")
# Print the full report to stdout so results survive in the job logs even
# when the pod's filesystem (and meta/camera_curation.json) is discarded.
report = curator.build_report(verdicts, mapping, cfg)
print("===== camera curation report =====", flush=True)
print(json.dumps(report, indent=2), flush=True)
print("===== end camera curation report =====", flush=True)
if cfg.mode == "rename": if cfg.mode == "rename":
if not mapping: if not mapping:
logger.info("curate-cameras: nothing to rename (no confident labels differ from current keys)") logger.info("curate-cameras: nothing to rename (no confident labels differ from current keys)")