MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / readable_bytes_string

Function readable_bytes_string

tensorboard/uploader/upload_tracker.py:29–36  ·  view source on GitHub ↗

Get a human-readable string for number of bytes.

(bytes)

Source from the content-addressed store, hash-verified

27
28
29def readable_bytes_string(bytes):
30 """Get a human-readable string for number of bytes."""
31 if bytes >= 2**20:
32 return "%.1f MB" % (float(bytes) / 2**20)
33 elif bytes >= 2**10:
34 return "%.1f kB" % (float(bytes) / 2**10)
35 else:
36 return "%d B" % bytes
37
38
39class UploadStats:

Callers 4

summarizeMethod · 0.85
_skipped_summaryMethod · 0.85
tensors_trackerMethod · 0.85
blob_trackerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…