Skip to content

Add a new goodput elastic utils function record_slice_state()#4111

Open
YixuanWang-99 wants to merge 1 commit into
mainfrom
yixuann-dev-goodput
Open

Add a new goodput elastic utils function record_slice_state()#4111
YixuanWang-99 wants to merge 1 commit into
mainfrom
yixuann-dev-goodput

Conversation

@YixuanWang-99

@YixuanWang-99 YixuanWang-99 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/utils/elastic_utils.py 9.09% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant