validate_restart_compatibility

jaxrens.cli.restart_validate.validate_restart_compatibility(root, *, checkpoint_path, snapshot_path)[source]

Refuse-or-warn on snapshot/current-config differences.

Parameters:
  • root (Any) – Current RootSpec (the YAML the user passed to this run).

  • checkpoint_path (Path) – Path to the checkpoint being resumed (used only in error messages).

  • snapshot_path (Path | None) – Path to {prefix}.config.snapshot.yaml written by the original run. None (or a non-existent path) means the original run predates the snapshot machinery; the function logs a warning and returns.

Raises:

SystemExit – With code 2 when any immutable field differs.

Return type:

None