Return a fresh, timestamped output directory for a run. The timestamp suffix ensures repeated runs of the same workflow do not overwrite each other. Format: `` _YYYYMMDD-HHMMSS``.
(task_name: str, timestamp: Optional[str] = None)
| 55 | |
| 56 | |
| 57 | def new_run_dir(task_name: str, timestamp: Optional[str] = None) -> Path: |
| 58 | """Return a fresh, timestamped output directory for a run. |
| 59 | |
| 60 | The timestamp suffix ensures repeated runs of the same workflow do not |
| 61 | overwrite each other. Format: ``<task_name>_YYYYMMDD-HHMMSS``. |
| 62 | """ |
| 63 | ts = timestamp or datetime.now().strftime(RUN_TIMESTAMP_FMT) |
| 64 | return outputs_root() / f"{task_name}_{ts}" |
| 65 | |
| 66 | |
| 67 | def find_latest_run_dir(task_name: str) -> Optional[Path]: |
nothing calls this directly
no test coverage detected