8000 [data] gather dask tests into single test files by aslonnie · Pull Request #54163 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[data] gather dask tests into single test files #54163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2025

Conversation

aslonnie
Copy link
Collaborator

so that general data tests no longer depend on dask, as dask dependency is optional.

@Copilot Copilot AI review requested due to automatic review settings June 27, 2025 01:45
@aslonnie aslonnie requested a review from a team as a code owner June 27, 2025 01:45
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR decouples general data tests from the optional Dask dependency by removing Dask-related assertions from existing test files and gathering all Dask integration tests into a new, dedicated test file.

  • Remove Dask usage from generic transform and optimizer tests
  • Introduce test_ecosystem_dask.py with all Dask-specific end-to-end tests
  • Update imports and test organization accordingly

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test_transform_pyarrow.py Removed a Dask-based assertion to eliminate Dask dependency from generic PyArrow tests.
test_execution_optimizer.py Deleted the Dask end-to-end test to keep optimizer tests independent of Dask.
test_ecosystem_dask.py Added new file containing all Dask integration tests and necessary helper imports.

@@ -28,8 +29,37 @@ def test_from_dask(ray_start_regular_shared):
assert df.equals(dfds)


def test_from_dask_e2e(ray_start_regular_shared):
Copy link
Preview
Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

Use pytest.importorskip('dask') at the top of this test to skip it when Dask is not installed, preventing failures in environments without the optional dependency.

Suggested change
def test_from_dask_e2e(ray_start_regular_shared):
def test_from_dask_e2e(ray_start_regular_shared):
pytest.importorskip('dask')

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

....

Comment on lines 61 to 57
dask.config.set({"dataframe.convert-string": False})

from ray.util.dask import ray_dask_get
Copy link
Preview
Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using a context manager (with dask.config.set(...):) or resetting the config after the test to avoid leaking this setting into other tests.

Suggested change
dask.config.set({"dataframe.convert-string": False})
from ray.util.dask import ray_dask_get
with dask.config.set({"dataframe.convert-string": False}):
from ray.util.dask import ray_dask_get

Copilot uses AI. Check for mistakes.

@aslonnie
Copy link
Collaborator Author

this is required for accepting #52589

@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Jun 27, 2025
so that general data tests no longer depend on dask,
as dask dependency is optional.

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
@aslonnie aslonnie force-pushed the lonnie-250626-dasksimple branch from 3ee7e80 to c048531 Compare June 27, 2025 03:07
@aslonnie aslonnie requested a review from bveeramani June 27, 2025 04:26
@aslonnie aslonnie changed the title [data] gather dask testing into special test files [data] gather dask tests into single test files Jun 27, 2025
Copy link
Member
@bveeramani bveeramani left a comment

Choose a reason for hiding this comment

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

Stamp

@richardliaw richardliaw added the data Ray Data-related issues label Jun 28, 2025
@aslonnie aslonnie merged commit a1dafd6 into master Jun 28, 2025
5 checks passed
@aslonnie aslonnie deleted the lonnie-250626-dasksimple branch June 28, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Ray Data-related issues go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0