| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
⚠️ Please install the Codecov Report❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## master #6942 +/- ##
==========================================
+ Coverage 49.06% 49.31% +0.25%
==========================================
Files 435 443 +8
Lines 54528 55078 +550
Branches 7954 8015 +61
==========================================
+ Hits 26752 27160 +408
- Misses 25898 26032 +134
- Partials 1878 1886 +8
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Feast set `DatasetContext.shuffle_strategy = "sort"`, which is not a member of `ray.data.context.ShuffleStrategy`. Up to Ray 2.58 the setter stored the raw string and Ray fell through to the pull-based sort shuffle. Ray 2.59 coerces the value with `ShuffleStrategy(value)`, so `ensure_ray_initialized()` and `RayResourceManager.configure_ray_context()` now raise `ValueError: 'sort' is not a valid ShuffleStrategy`. Use `ShuffleStrategy.SORT_SHUFFLE_PULL_BASED`, which keeps the behavior on older Ray versions and is accepted by Ray 2.59. Signed-off-by: Yihang Chen <yhc0720@berkeley.edu>
| Back | FazBrowse Home | New Git URL |
What this PR does / why we need it:
Feast configures the Ray Data context with
in ray_initializer.py (local, KubeRay/remote and "already initialized" paths of ensure_ray_initialized()) and in RayResourceManager.configure_ray_context().
"sort" has never been a member of ray.data.context.ShuffleStrategy (the values are sort_shuffle_pull_based, sort_shuffle_push_based, hash_shuffle, ...), which is why the # type: ignore was needed. Up to Ray 2.58 the setter stored the raw string, and since it does not equal SORT_SHUFFLE_PUSH_BASED Ray fell through to the pull-based sort shuffle.
Ray 2.59.0 (released 2026-10-02) coerces the value in the setter (self._shuffle_strategy = ShuffleStrategy(value)), so every Ray initialization in Feast now fails:
$ pip install "ray==2.59.0" $ pytest sdk/python/tests/component/ray/test_nodes.py::test_ray_initialization_and_kuberay_modes ... sdk/python/feast/infra/ray_initializer.py:858: in ensure_ray_initialized ctx.shuffle_strategy = "sort" # type: ignore ... E ValueError: 'sort' is not a valid ShuffleStrategyfeast[ray] requires ray>=2.47.0 on Python 3.10, so a fresh install there already picks up 2.59.0. On 3.11+ Ray currently comes in through codeflare-sdk (which pins ray==2.58.0), so it will break as soon as that pin moves or a user installs a newer Ray.
This PR uses ShuffleStrategy.SORT_SHUFFLE_PULL_BASED instead. That is exactly what "sort" resolved to on Ray <= 2.58, so behavior does not change there, and Ray 2.59 accepts it. ShuffleStrategy exists in all Ray versions Feast supports (>= 2.47).
Tests added to sdk/python/tests/component/ray/test_resource_scheduling.py (TestShuffleStrategy) check that both RayResourceManager.configure_ray_context() and ensure_ray_initialized() leave a valid ShuffleStrategy member on the context. They fail before the fix on both Ray 2.58.0 (value is the plain string "sort") and Ray 2.59.0 (ValueError), and pass after it.
Which issue(s) this PR fixes:
No existing issue; found by running the Ray component tests against the latest Ray release.
Checks
Testing Strategy
Locally (macOS, Python 3.12, py3.12-ci-requirements.txt): pytest sdk/python/tests/component/ray → 75 passed with both ray==2.58.0 and ray==2.59.0 (before the fix: 1 existing failure on 2.59.0 plus the 2 new tests failing on both versions). pytest sdk/python/tests/unit -k "ray or Ray" → 66 passed, 1 skipped. ruff check / ruff format --check pass; mypy on the two changed modules reports the same single pre-existing error as on master.
Misc