Add a new goodput elastic utils function record_slice_state()#4111
Open
YixuanWang-99 wants to merge 6 commits into
Open
Add a new goodput elastic utils function record_slice_state()#4111YixuanWang-99 wants to merge 6 commits into
YixuanWang-99 wants to merge 6 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
fcd49ed to
6b41af4
Compare
dipannita08
reviewed
Jun 12, 2026
dipannita08
reviewed
Jun 12, 2026
| active_slices = active_slices_override if active_slices_override is not None else len(elastic_manager.active_slice_indices) | ||
| total_slices = len(elastic_manager.slice_to_devices) | ||
|
|
||
| if recorder: |
Collaborator
There was a problem hiding this comment.
recorder should be non-None here because of your previous check in Ln 33.
4ea73ce to
d4a529c
Compare
dipannita08
reviewed
Jun 12, 2026
This reverts commit 8b88b9f.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update MaxText's utils/elastic_utils.py to add a new record_slice_state helper that queries live slice counts and logs them to the GoodputRecorder. This helper maps the core metrics directly from Pathways and JAX states.
Tests
Passed synthetic tests in tests/unit/elastic_utils_test.py.
Test with a small synthetic workflow and the logs are good:
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.