Skip to content

Commit 5c5e9b1

Browse files
DannyLiComycchenzheng
authored andcommitted
Added live slice count
(cherry picked from commit dc08dde04de59e4c7f8a6d67d16107deb31fc642)
1 parent f93627f commit 5c5e9b1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/maxtext/common/metric_logger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from maxtext.utils import max_logging
3636
from maxtext.utils import max_utils
3737
from maxtext.utils import maxtext_utils
38+
from maxtext.utils import elastic_utils
3839
from collections import defaultdict
3940

4041
mldiag, _ = mldiagnostics_modules()
@@ -166,6 +167,7 @@ def _log_training_metrics(self, metrics, step):
166167
log_parts.extend(
167168
[
168169
f"completed step: {step}",
170+
f"live slice count: {len(elastic_utils.live_slice_indices(self.config))}",
169171
f"seconds: {scalars['perf/step_time_seconds']:.3f}",
170172
]
171173
)

0 commit comments

Comments
 (0)