Skip to content

Commit

Permalink
[Datasets] Remove the assertion for ds.stats() in test_dataset_image.…
Browse files Browse the repository at this point in the history
…py (ray-project#33171)

The test is very flaky and it's because the async nature from StatsActor for ds.stats() call (some discssuion in the past). We can remove the assertion here because the assertion of ds.num_blocks() is enough, and we have separate test file stats - test_stats.py.

Signed-off-by: Cheng Su <[email protected]>
  • Loading branch information
c21 authored and peytondmurray committed Mar 22, 2023
1 parent a4181f3 commit 674c001
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions python/ray/data/tests/test_dataset_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from ray.data.tests.conftest import * # noqa
from ray.data.tests.mock_http_server import * # noqa
from ray.tests.conftest import * # noqa
from ray._private.test_utils import wait_for_condition


class TestReadImages:
Expand Down Expand Up @@ -193,12 +192,10 @@ def test_dynamic_block_split(ray_start_regular_shared):
ds.fully_executed()
# Verify dynamic block splitting taking effect to generate more blocks.
assert ds.num_blocks() == 3
wait_for_condition(lambda: "3 blocks executed" in ds.stats(), timeout=20)

# Test union of same datasets
union_ds = ds.union(ds, ds, ds).fully_executed()
assert union_ds.num_blocks() == 12
assert "3 blocks executed" in union_ds.stats()
finally:
ctx.target_max_block_size = target_max_block_size
ctx.block_splitting_enabled = block_splitting_enabled
Expand Down

0 comments on commit 674c001

Please sign in to comment.