Skip to content

Fix unspecified mesh-axis integer validation#4102

Merged
huytransformer merged 1 commit into
AI-Hypercomputer:mainfrom
huytransformer:htn/fix-unspecified-mesh-axis-integer-check
Jun 9, 2026
Merged

Fix unspecified mesh-axis integer validation#4102
huytransformer merged 1 commit into
AI-Hypercomputer:mainfrom
huytransformer:htn/fix-unspecified-mesh-axis-integer-check

Conversation

@huytransformer

@huytransformer huytransformer commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes fill_unspecified_mesh_axes by calling float.is_integer() when validating inferred mesh-axis parallelism.

Previously the assertion checked the bound method object instead of the boolean result, so non-integer inferred values could pass the intended validation.

Tests

  • python3 -m py_compile src/maxtext/utils/max_utils.py tests/unit/max_utils_test.py
  • git diff --check
  • python3 -m pytest tests/unit/max_utils_test.py -k FillUnspecifiedMeshAxesTest

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

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@huytransformer huytransformer merged commit 0b2777e into AI-Hypercomputer:main Jun 9, 2026
43 of 44 checks passed
copybara-service Bot pushed a commit that referenced this pull request Jun 10, 2026
Fixes `fill_unspecified_mesh_axes` by calling `float.is_integer()` when validating inferred mesh-axis parallelism.

Previously the assertion checked the bound method object instead of the boolean result, so non-integer inferred values could pass the intended validation.
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.

3 participants