snapshot_path_for_checkpoint

jaxrens.cli.output_gate.snapshot_path_for_checkpoint(checkpoint_path)[source]

Locate the snapshot YAML that should sit next to a checkpoint.

Strips .checkpoint.h5 / .final.checkpoint.h5 from the checkpoint filename to recover the prefix, then forms <ckpt_dir>/<prefix>.config.snapshot.yaml. Returns None if the checkpoint filename does not match the recognised suffixes — the caller can decide whether to error or skip snapshot-based validation.

Parameters:

checkpoint_path (Path | str)

Return type:

Path | None