MCPcopy Create free account
hub / github.com/ray-project/ray / _get_batch_based_files

Function _get_batch_based_files

python/ray/data/tests/test_checkpoint.py:134–144  ·  view source on GitHub ↗

Get checkpoint file paths for batch-based backends.

(ckpt_path: str, fs)

Source from the content-addressed store, hash-verified

132
133
134def _get_batch_based_files(ckpt_path: str, fs) -> List[str]:
135 """Get checkpoint file paths for batch-based backends."""
136 if fs is None:
137 if not os.path.exists(ckpt_path):
138 return []
139 return [os.path.join(ckpt_path, f) for f in os.listdir(ckpt_path)]
140 else:
141 files = fs.get_file_info(
142 FileSelector(_unwrap_protocol(ckpt_path), allow_not_found=True)
143 )
144 return [file_info.path for file_info in files if file_info.is_file]
145
146
147def _read_batch_file_ids(file_paths: List[str], id_column: str, fs) -> List[int]:

Callers 1

Calls 5

_unwrap_protocolFunction · 0.90
existsMethod · 0.80
listdirMethod · 0.80
get_file_infoMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…