Skip to content

Refactor layer-wise tests with torch - #4633

Open
hengtaoguo wants to merge 1 commit into
mainfrom
hengtaoguo-test
Open

Refactor layer-wise tests with torch#4633
hengtaoguo wants to merge 1 commit into
mainfrom
hengtaoguo-test

Conversation

@hengtaoguo

@hengtaoguo hengtaoguo commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Reverts the standalone cpu_torch_reference_tests workflow and integrates gemma4_layers_test.py into the standard cpu-unit tests. The test is configured to run only on scheduled CI runs.

  • Removed maxtext_cpu_torch_reference_tests workflow.
  • Enabled gemma4_layers_test.py in pytest.ini, and marked it as cpu_only and scheduled_only.
  • Configured torch installation for cpu-unit only during scheduled runs.

TODO: After this atomic PR, follow up with another PR refactoring import torch for other layer-wise tests, and add them to scheduled runs cleanly.

Tests

JAX_PLATFORMS=cpu python -m pytest tests/unit/gemma4_layers_test.py

Note: GitHub Actions Scan is failing due to a very recent Google-wise security rollout on 07-27-2026.

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.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hengtaoguo
hengtaoguo marked this pull request as ready for review July 28, 2026 03:06
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

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