Skip to content

Conversation

@elliot-barn
Copy link
Contributor

@elliot-barn elliot-barn commented Dec 9, 2025

removing gpy as a dependency
depends on #59152

Signed-off-by: elliot-barn <[email protected]>
@elliot-barn elliot-barn requested a review from aslonnie December 9, 2025 06:28
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Dec 9, 2025
Copy link
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 removes gpy as a dependency and disables tests for the PB2 scheduler, which relies on gpy. The changes are correct and align with the PR's objective. My main feedback is about the long-term plan for the PB2 scheduler. The reason for skipping tests is 'for now since gpy is no longer supported', which is slightly ambiguous. If the removal of gpy support is permanent, it would be better for maintainability to remove the PB2 code and related tests entirely, rather than just skipping them. If it's a temporary measure, adding a reference to a tracking issue would provide more clarity.

Comment on lines 1485 to 1487
@pytest.mark.skip(
reason="Skipping PB2 tests for now since gpy is no longer supported"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The reason for skipping is a bit ambiguous ('for now' vs 'no longer supported'). If gpy is permanently removed, consider removing the PB2 scheduler and its related tests altogether instead of just skipping them. This would improve maintainability by removing dead code. This would involve deleting python/ray/tune/schedulers/pb2.py, python/ray/tune/schedulers/pb2_utils.py, and removing the tests in python/ray/tune/tests/test_trial_scheduler_pbt.py and this test.

If this is a temporary measure, could you add a link to a tracking issue in the reason string for future reference?

@elliot-barn elliot-barn marked this pull request as ready for review December 9, 2025 17:52
@elliot-barn elliot-barn requested a review from a team as a code owner December 9, 2025 17:52
return {"training_iteration": time, "score": val}


@pytest.mark.skip(reason="Skipping PB2 tests for now since gpy is no longer supported")
Copy link

Choose a reason for hiding this comment

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

Bug: Module import fails without GPy dependency

The test files have top-level imports of PB2 and UCB from pb2_utils, but pb2_utils.py has import GPy at the module level. Since gpy is being removed as a dependency, these test modules will fail to import entirely with a ModuleNotFoundError. The @pytest.mark.skip decorator only skips test execution after the module loads successfully - it cannot prevent import-time failures. This will cause all tests in test_trial_scheduler_pbt.py (including non-PB2 tests) and test_api.py to fail.

Additional Locations (1)

Fix in Cursor Fix in Web

@ray-gardener ray-gardener bot added the train Ray Train Related Issue label Dec 9, 2025
@aslonnie
Copy link
Collaborator

aslonnie commented Dec 9, 2025

@ray-project/ray-tune @ray-project/ray-train please have a look and let us know if we have your blessings to do this.

Signed-off-by: elliot-barn <[email protected]>
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.

3 participants