test: support ray >= 2.56 Arrow-backed pandas conversion - #5284
Open
jonasdedden wants to merge 1 commit into
Open
test: support ray >= 2.56 Arrow-backed pandas conversion#5284jonasdedden wants to merge 1 commit into
jonasdedden wants to merge 1 commit into
Conversation
Ray 2.56 turned on `DataContext.enable_arrow_backed_pandas_conversion`, so `Dataset.to_pandas()` now maps Arrow types onto `pd.ArrowDtype` instead of numpy dtypes. Seven tests compared those frames against plain pandas frames and Python literals and started failing: two on dtype (`int64` vs `int64[pyarrow]`) and five on nulls (`None` vs `pd.NA`). `lance_ray` itself is unaffected - it drives Ray with `batch_format="pyarrow"` throughout - so the fix is confined to the assertions. `to_numpy_backed()` normalises a frame back to numpy dtypes and is a no-op when no column is Arrow-backed, which keeps the assertions exact on both sides of the 2.56 release rather than relaxing them with `check_dtype=False`. uv.lock moves ray 2.53.0 -> 2.58.0 so CI exercises the new default. Verified: full suite green on ray 2.58.0, and the three touched files green on 2.53.0 and 2.55.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ray 2.56 turned on
DataContext.enable_arrow_backed_pandas_conversion, soDataset.to_pandas()now maps Arrow types ontopd.ArrowDtypeinstead of numpy dtypes. Seven tests compared those frames against plain pandas frames and Python literals and started failing: two on dtype (int64vsint64[pyarrow]) and five on nulls (Nonevspd.NA).lance_rayitself is unaffected - it drives Ray withbatch_format="pyarrow"throughout - so the fix is confined to the assertions.to_numpy_backed()normalises a frame back to numpy dtypes and is a no-op when no column is Arrow-backed, which keeps the assertions exact on both sides of the 2.56 release rather than relaxing them withcheck_dtype=False.uv.lock moves ray 2.53.0 -> 2.58.0 so CI exercises the new default.
Verified: full suite green on ray 2.58.0, and the three touched files green on 2.53.0 and 2.55.0.