Get checkpoint file paths for batch-based backends.
(ckpt_path: str, fs)
| 132 | |
| 133 | |
| 134 | def _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 | |
| 147 | def _read_batch_file_ids(file_paths: List[str], id_column: str, fs) -> List[int]: |
no test coverage detected
searching dependent graphs…