(blob_file_paths)
| 194 | |
| 195 | def convert_blobs(exp_dir, out_dir): |
| 196 | def convert_blob_value(blob_file_paths): |
| 197 | # Exported values are lists of paths to .bin binary files, representing |
| 198 | # the blobs in each sequence, for each blob sequence in the series. |
| 199 | blobs = [] |
| 200 | for blob_file_path in blob_file_paths: |
| 201 | if os.path.dirname(blob_file_path) != _BLOBS_DIR: |
| 202 | logging.warning( |
| 203 | "Skipping invalid blob file path %r", blob_file_path |
| 204 | ) |
| 205 | continue |
| 206 | with open(os.path.join(exp_dir, blob_file_path), mode="rb") as f: |
| 207 | blobs.append(f.read()) |
| 208 | # Omit dtype; that's fine since read path ignores it anyway. |
| 209 | blob_tensor = tensor_util.make_tensor_proto( |
| 210 | values=blobs, shape=[len(blobs)] |
| 211 | ) |
| 212 | return Summary.Value(tensor=blob_tensor) |
| 213 | |
| 214 | run_to_series = load_run_to_series(os.path.join(exp_dir, _BLOBS_FILE)) |
| 215 | for run, series_list in run_to_series.items(): |
no test coverage detected
searching dependent graphs…