Reads index files written with `write_index_file`.
(ckpt_dir: str)
| 359 | |
| 360 | |
| 361 | def 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 | |
| 367 | def _parse_tensor_spec(spec_dict: dict[str, str]) -> TensorSpec: |