|
23 | 23 |
|
24 | 24 | from collections.abc import Mapping, Sequence |
25 | 25 | import contextlib |
26 | | -from typing import Any, Optional, Union |
| 26 | +from typing import Any, Optional |
27 | 27 |
|
28 | 28 | from clu import asynclib |
29 | 29 |
|
30 | 30 | from clu.metric_writers import interface |
31 | 31 | from clu.metric_writers import multi_writer |
32 | 32 | import wrapt |
33 | 33 |
|
34 | | - |
35 | 34 | Array = interface.Array |
36 | 35 | Scalar = interface.Scalar |
37 | 36 |
|
@@ -97,44 +96,21 @@ def write_videos(self, step: int, videos: Mapping[str, Array]): |
97 | 96 |
|
98 | 97 | @_wrap_exceptions |
99 | 98 | def write_audios( |
100 | | - self, step: int, audios: Mapping[str, Array], *, sample_rate: int |
101 | | - ): |
| 99 | + self, step: int, audios: Mapping[str, Array], *, sample_rate: int): |
102 | 100 | self._pool(self._writer.write_audios)( |
103 | | - step=step, audios=audios, sample_rate=sample_rate |
104 | | - ) |
| 101 | + step=step, audios=audios, sample_rate=sample_rate) |
105 | 102 |
|
106 | 103 | @_wrap_exceptions |
107 | 104 | def write_texts(self, step: int, texts: Mapping[str, str]): |
108 | 105 | self._pool(self._writer.write_texts)(step=step, texts=texts) |
109 | 106 |
|
110 | 107 | @_wrap_exceptions |
111 | | - def write_histograms( |
112 | | - self, |
113 | | - step: int, |
114 | | - arrays: Mapping[str, Array], |
115 | | - num_buckets: Optional[Mapping[str, int]] = None, |
116 | | - ): |
| 108 | + def write_histograms(self, |
| 109 | + step: int, |
| 110 | + arrays: Mapping[str, Array], |
| 111 | + num_buckets: Optional[Mapping[str, int]] = None): |
117 | 112 | self._pool(self._writer.write_histograms)( |
118 | | - step=step, arrays=arrays, num_buckets=num_buckets |
119 | | - ) |
120 | | - |
121 | | - @_wrap_exceptions |
122 | | - def write_pointcloud( |
123 | | - self, |
124 | | - step: int, |
125 | | - point_clouds: Mapping[str, Array], |
126 | | - *, |
127 | | - point_colors: Optional[Array] = None, |
128 | | - configs: Optional[ |
129 | | - Mapping[str, Union[str, int, float, bool, None]] |
130 | | - ] = None, |
131 | | - ): |
132 | | - self._pool(self._writer.write_pointcloud)( |
133 | | - step=step, |
134 | | - point_clouds=point_clouds, |
135 | | - point_colors=point_colors, |
136 | | - configs=configs, |
137 | | - ) |
| 113 | + step=step, arrays=arrays, num_buckets=num_buckets) |
138 | 114 |
|
139 | 115 | @_wrap_exceptions |
140 | 116 | def write_hparams(self, hparams: Mapping[str, Any]): |
|
0 commit comments