Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Hi @gagika, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
This Pull Request successfully introduces several optimizations to speed up the cpu-unit CI. By increasing parallelism, introducing test duration recording for better load balancing, and reducing the complexity of MoE compilation tests, the CI efficiency is significantly improved without compromising the validity of the tests.
🔍 General Feedback
- Excellent CI Optimizations: The use of
pytest-splitwith stored durations on scheduled runs is a very effective way to handle imbalanced test shards. - Smart Model Overrides: Using
override_model_configto reduce the number of layers in compilation tests is a high-impact change that drastically reduces compilation overhead. - Improved Maintainability: The refactoring of MoE tests into helper methods makes the test suite cleaner and easier to maintain.
| SPLIT_ARGS="--splits ${INPUTS_TOTAL_WORKERS} --group ${INPUTS_WORKER_GROUP} -n auto" | ||
| # On scheduled runs, record per-shard durations so future splits balance by time (LPT). | ||
| # Merge artifacts offline and commit as .test_durations at repo root. | ||
| if [ "${INPUTS_IS_SCHEDULED_RUN}" == "true" ]; then |
There was a problem hiding this comment.
🟢 Recording per-shard durations on scheduled runs is an excellent strategy for optimizing CI load balancing. Merging these artifacts into a central `.test_durations` file will allow `pytest-split` to balance future runs more effectively using the Least Progress Time (LPT) algorithm.
| "compile_topology=v5p-64", | ||
| "compile_topology_num_slices=8", | ||
| "compile_topology=v5p-8", | ||
| "compile_topology_num_slices=2", |
There was a problem hiding this comment.
🟢 Reducing the `compile_topology` and `compile_topology_num_slices` here is appropriate for a unit/compilation test. It speeds up the CI by requiring fewer resources and less time to verify that the pipeline parallelism logic compiles correctly.
| "compile_topology_num_slices=1", | ||
| "model_name=mixtral-8x7b", | ||
| "override_model_config=true", | ||
| "base_num_decoder_layers=8", |
There was a problem hiding this comment.
🟢 Using `override_model_config=true` and reducing `base_num_decoder_layers` to 8 is a great optimization for compilation tests. This significantly reduces the graph size and compilation time while still exercising the necessary code paths for MoE models.
| export MAXTEXT_PKG_DIR=$(pwd)/src/maxtext | ||
| # TODO(b/454659463): Enable test_default_hlo_match after volume mount is supported. | ||
| .venv/bin/python3 -m pytest ${{ inputs.pytest_addopts }} -v -m "${FINAL_PYTEST_MARKER}" -k "not AotHloIdenticalTest and not CompileThenLoad" --durations=0 | ||
| .venv/bin/python3 -m pytest ${{ inputs.pytest_addopts }} -v -m "${FINAL_PYTEST_MARKER}" -k "not AotHloIdenticalTest and not AotJaxprIdenticalTest and not CompileThenLoad and not test_diloco_two_slices" --durations=0 |
There was a problem hiding this comment.
🟡 Skipping `test_diloco_two_slices` helps stabilize the CI, but it would be beneficial to link a tracking issue or add a TODO explaining why this test is being skipped and if it's intended to be re-enabled later.
b43b796 to
8182ccd
Compare
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.
Description
Start with a short description of what the PR does and how this is a change from
the past.
The rest of the description includes relevant details and context, examples:
If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
FIXES: #123456
Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.
Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.
Tests
Please describe how you tested this change, and include any instructions and/or
commands to reproduce.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.