MCPcopy Create free account
hub / github.com/apple/axlearn / read_index_file

Function read_index_file

axlearn/common/checkpointer.py:361–364  ·  view source on GitHub ↗

Reads index files written with `write_index_file`.

(ckpt_dir: str)

Source from the content-addressed store, hash-verified

359
360
361def read_index_file(ckpt_dir: str) -> Nested[Any]:
362 """Reads index files written with `write_index_file`."""
363 with fs.open(os.path.join(ckpt_dir, "index"), "r") as f:
364 return json.loads(f.read())
365
366
367def _parse_tensor_spec(spec_dict: dict[str, str]) -> TensorSpec:

Callers 4

test_indexMethod · 0.90
read_state_specFunction · 0.85
restore_from_dirMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by 1

test_indexMethod · 0.72