Repository navigation
write git version into the run dir for reproducibility - #637
Conversation
ad0260c to
6eda7a6
Compare
ed4bc94 to
3d8ffd1
Compare
3d8ffd1 to
d25f8ca
Compare
6eda7a6 to
7a242b3
Compare
7a242b3 to
fd3fecb
Compare
4a8be78 to
677a62d
Compare
4b49d7c to
0ce439f
Compare
|
| def git_untracked() -> bytes: | ||
| """Newline-separated paths of untracked, non-ignored files (names only; | ||
| untracked files inside submodules are not listed). Raises GitError.""" | ||
| return _git("ls-files", "--others", "--exclude-standard") |
There was a problem hiding this comment.
If a run uses a new, untracked file outside egomimic/utils, such as a training config, this command lists only files beneath the helper's working directory. The file is omitted from git_untracked.txt, leaving the run's provenance incomplete. Run the listing from the work-tree root.
| def on_validation_start(self, trainer, pl_module) -> None: | ||
| # Validate-only (eval) runs never reach on_fit_start. | ||
| self._write_once(trainer) |
There was a problem hiding this comment.
| if (root / "git_sha.txt").exists(): | ||
| tag = "." + datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ") | ||
| (root / f"git_sha{tag}.txt").write_text(sha + "\n", encoding="utf-8") |
There was a problem hiding this comment.
b9e1287 to
ffebd78
Compare
b195bb5 to
22327ba
Compare
ffebd78 to
bcb8775
Compare
22327ba to
125facf
Compare
Rank-0, once per process: on fit start, or on validation start for validate-only (eval) runs; enabled in callbacks/defaults.yaml so every shipped top-level config gets it. Writes git_sha.txt, git.diff (`git diff HEAD --submodule=diff`, raw bytes so non-UTF-8 edits neither crash training nor stop the patch applying; includes file diffs inside external/openpi) and git_untracked.txt (names only). A failed diff or listing leaves <file>.error with the reason instead of an empty file, so it never reads as a clean tree. A process that finds git_sha.txt already in the run dir (Slurm requeue, resume) writes git_sha.<UTC time>.txt etc. beside it, keeping the first launch's record. No-op with one warning when git is missing or egomimic is not a checkout; write errors are logged, never raised. wandb records the sha online; this covers offline runs and keeps provenance next to the checkpoints. The git helper lives in egomimic/utils/git_info.py (every call bounded by a 30 s timeout, up from zarr_writer's old 5 s); zarr_writer's and norm_cache's provenance stamps now use it, so norm_cache no longer imports zarr_writer. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s
125facf to
61425db
Compare

Rank-0, once per process: on fit start, or on validation start for
validate-only (eval) runs; enabled in callbacks/defaults.yaml so every shipped
top-level config gets it. Writes git_sha.txt, git.diff (
git diff HEAD --submodule=diff, raw bytes so non-UTF-8 edits neither crash training nor stopthe patch applying; includes file diffs inside external/openpi) and
git_untracked.txt (names only). A failed diff or listing leaves
.error with the reason instead of an empty file, so it never reads as a
clean tree. A process that finds git_sha.txt already in the run dir (Slurm
requeue, resume) writes git_sha..txt etc. beside it, keeping the
first launch's record. No-op with one warning when git is missing or egomimic
is not a checkout; write errors are logged, never raised. wandb records the sha
online; this covers offline runs and keeps provenance next to the checkpoints.
The git helper lives in egomimic/utils/git_info.py (every call bounded by a
30 s timeout, up from zarr_writer's old 5 s); zarr_writer's and norm_cache's
provenance stamps now use it, so norm_cache no longer imports zarr_writer.
Co-Authored-By: Claude Fable 5.1 [email protected]
Claude-Session: https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh
Co-Authored-By: Claude Opus 5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh
https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s