Skip to content

Revising test_jax_trainer flaky test#56854

Merged
matthewdeng merged 8 commits intoray-project:masterfrom
JasonLi1909:revisit-test-jax-trainer
Oct 3, 2025
Merged

Revising test_jax_trainer flaky test#56854
matthewdeng merged 8 commits intoray-project:masterfrom
JasonLi1909:revisit-test-jax-trainer

Conversation

@JasonLi1909
Copy link
Copy Markdown
Contributor

@JasonLi1909 JasonLi1909 commented Sep 23, 2025

Revisiting #56548 as test continues to be flaky on CI

Solution: The previous attempt to deflake this test still used a pip install jax via the ray.init runtime_env args. Hence, the pip install related error persisted. This PR instead adds jax and jaxlib as a dependency of CI train tests, avoiding the need to pip install jax via the runtime_env.

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
@JasonLi1909 JasonLi1909 requested a review from a team as a code owner September 23, 2025 22:05
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a flaky test in test_jax_trainer.py by removing a runtime_env that was being used to set up the JAX environment in test fixtures. The removed runtime_env was installing jax via pip and forcing JAX_PLATFORMS to cpu, which is a likely source of flakiness and incorrect for tests simulating TPU environments. The change simplifies the test setup and relies on a pre-configured test environment, which is a good practice for improving test stability. The changes are correct and well-justified.

@ray-gardener ray-gardener bot added the train Ray Train Related Issue label Sep 24, 2025
cursor[bot]

This comment was marked as outdated.

JasonLi1909 and others added 6 commits October 2, 2025 01:06
Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
@matthewdeng matthewdeng enabled auto-merge (squash) October 3, 2025 21:00
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Oct 3, 2025
@matthewdeng matthewdeng merged commit 3ff36f9 into ray-project:master Oct 3, 2025
8 checks passed
dstrodtman pushed a commit that referenced this pull request Oct 6, 2025
Revisiting #56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
liulehui pushed a commit to liulehui/ray that referenced this pull request Oct 9, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
joshkodi pushed a commit to joshkodi/ray that referenced this pull request Oct 13, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: Josh Kodi <joshkodi@gmail.com>
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
Revisiting ray-project#56548 as test
continues to be flaky on CI

**Solution**: The previous attempt to deflake this test still used a
`pip install jax` via the `ray.init` runtime_env args. Hence, the pip
install related error persisted. This PR instead adds `jax` and `jaxlib`
as a dependency of CI train tests, avoiding the need to `pip install
jax` via the runtime_env.

---------

Signed-off-by: JasonLi1909 <jasli1909@gmail.com>
Signed-off-by: Jason Li <57246540+JasonLi1909@users.noreply.github.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants