Skip to content
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

test(python): Skip some OOC tests that fail randomly in the CI #14434

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions py-polars/tests/unit/streaming/test_streaming_group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,13 @@ def test_streaming_group_by_ooc_q1(
tmp_path: Path,
monkeypatch: Any,
) -> None:
s = random_integers

tmp_path.mkdir(exist_ok=True)
monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path))
monkeypatch.setenv("POLARS_FORCE_OOC", "1")

lf = random_integers.to_frame().lazy()
result = (
s.to_frame()
.lazy()
.group_by("a")
lf.group_by("a")
.agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last"))
.sort("a")
.collect(streaming=True)
Expand All @@ -240,17 +237,13 @@ def test_streaming_group_by_ooc_q2(
tmp_path: Path,
monkeypatch: Any,
) -> None:
s = random_integers

tmp_path.mkdir(exist_ok=True)
monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path))
monkeypatch.setenv("POLARS_FORCE_OOC", "1")

lf = random_integers.cast(str).to_frame().lazy()
result = (
s.cast(str)
.to_frame()
.lazy()
.group_by("a")
lf.group_by("a")
.agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last"))
.sort("a")
.collect(streaming=True)
Expand All @@ -266,22 +259,22 @@ def test_streaming_group_by_ooc_q2(
assert_frame_equal(result, expected)


@pytest.mark.skip(
reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526"
)
@pytest.mark.write_disk()
def test_streaming_group_by_ooc_q3(
random_integers: pl.Series,
tmp_path: Path,
monkeypatch: Any,
) -> None:
s = random_integers

tmp_path.mkdir(exist_ok=True)
monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path))
monkeypatch.setenv("POLARS_FORCE_OOC", "1")

lf = pl.LazyFrame({"a": random_integers, "b": random_integers})
result = (
pl.DataFrame({"a": s, "b": s})
.lazy()
.group_by(["a", "b"])
lf.group_by("a", "b")
.agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last"))
.sort("a")
.collect(streaming=True)
Expand Down
11 changes: 8 additions & 3 deletions py-polars/tests/unit/streaming/test_streaming_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def test_ooc_sort(tmp_path: Path, monkeypatch: Any) -> None:
assert_series_equal(out, s.sort(descending=descending))


@pytest.mark.skip(
reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526"
)
@pytest.mark.write_disk()
def test_streaming_sort(tmp_path: Path, monkeypatch: Any, capfd: Any) -> None:
tmp_path.mkdir(exist_ok=True)
Expand All @@ -111,14 +114,17 @@ def test_streaming_sort(tmp_path: Path, monkeypatch: Any, capfd: Any) -> None:
assert "df -> sort" in err


@pytest.mark.skip(
reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526"
)
@pytest.mark.write_disk()
def test_out_of_core_sort_9503(tmp_path: Path, monkeypatch: Any) -> None:
tmp_path.mkdir(exist_ok=True)
monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path))
monkeypatch.setenv("POLARS_FORCE_OOC", "1")
np.random.seed(0)

num_rows = 1_00_000
num_rows = 100_000
num_columns = 2
num_tables = 10

Expand Down Expand Up @@ -169,8 +175,7 @@ def test_out_of_core_sort_9503(tmp_path: Path, monkeypatch: Any) -> None:


@pytest.mark.skip(
reason="This test is unreliable - it fails intermittently in our CI"
" with 'OSError: No such file or directory (os error 2)'."
reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526"
)
@pytest.mark.write_disk()
@pytest.mark.slow()
Expand Down