Skip to content

Fix compile_cache_test by filtering cache files for jit_train_step#4222

Open
igorts-git wants to merge 1 commit into
mainfrom
igorts/b517327969-nightly-build-failure
Open

Fix compile_cache_test by filtering cache files for jit_train_step#4222
igorts-git wants to merge 1 commit into
mainfrom
igorts/b517327969-nightly-build-failure

Conversation

@igorts-git

@igorts-git igorts-git commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Previously, test_train_step_cache_hit asserted that the compilation cache contained exactly 1 file, assuming only the jit_train_step would be cached. However, in nightly workflow JAX also caches other compiled functions, causing the test to fail.

This fix changes the assertion to filter the cache files for the prefix before verifying that only one compilation occurred, making the test robust against other functions being cached.

BUGS: b/517327969

Tests

Manual of the affected test

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.

…in_step.

Previously, test_train_step_cache_hit asserted that the compilation cache contained exactly 1 file, assuming only  would be cached. However, in some environments (like nightly workflows), JAX also caches other compiled functions (like ), causing the test to fail.

This fix changes the assertion to filter the cache files for the  prefix before verifying that only one compilation occurred, making the test robust against other functions being cached.
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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.

2 participants