MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / convert_blob_value

Function convert_blob_value

tensorboard/tools/convert_tbdev_export.py:196–212  ·  view source on GitHub ↗
(blob_file_paths)

Source from the content-addressed store, hash-verified

194
195def 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():

Callers 1

convert_blobsFunction · 0.85

Calls 3

joinMethod · 0.45
appendMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…