Skip to content

Commit e8d7bb5

Browse files
CLU Authorscopybara-github
authored andcommitted
Reduce I/O burden by removing metrics loggings in training.
PiperOrigin-RevId: 859186365
1 parent 3fdcf85 commit e8d7bb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clu/metric_writers/logging_writer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ def write_summaries(
4242
{k: v.shape for k, v in values.items()})
4343

4444
def write_scalars(self, step: int, scalars: Mapping[str, Scalar]):
45-
values = [
45+
# Re-enable logging of scalars if the SyncWait problem is resolved.
46+
_ = [
4647
f"{k}={v:.6g}" if isinstance(v, float) else f"{k}={v}"
4748
for k, v in sorted(scalars.items())
4849
]
49-
logging.info("[%d]%s %s", step, self._collection_str, ", ".join(values))
50+
# logging.info("[%d]%s %s", step, self._collection_str, ", ".join(values))
5051

5152
def write_images(self, step: int, images: Mapping[str, Array]):
5253
logging.info("[%d]%s Got images: %s.", step, self._collection_str,

0 commit comments

Comments
 (0)