Skip to content

Commit 33b229a

Browse files
authored
Fix CI for changes in from_map (#9011)
1 parent 55bb639 commit 33b229a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

distributed/shuffle/tests/test_shuffle.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ def make_partition(i):
24452445
return pd.DataFrame({"a": np.random.random(10), "b": np.random.random(10)})
24462446

24472447
with dask.config.set({"dataframe.convert-string": False}):
2448-
ddf = dd.from_map(make_partition, range(5))
2448+
ddf = dd.from_map(make_partition, range(5), meta={"a": float, "b": float})
24492449
with dask.config.set({"dataframe.shuffle.method": "p2p"}):
24502450
out = ddf.shuffle(on="a", ignore_index=True)
24512451
result, expected = c.compute([ddf, out])
@@ -2498,7 +2498,7 @@ def make_partition(i):
24982498
)
24992499
return pd.DataFrame({"a": np.random.random(10), "b": np.random.random(10)})
25002500

2501-
ddf = dd.from_map(make_partition, range(50))
2501+
ddf = dd.from_map(make_partition, range(50), meta={"a": float, "b": float})
25022502
with dask.config.set({"dataframe.shuffle.method": "p2p"}):
25032503
out = ddf.shuffle(on="a", ignore_index=True)
25042504

@@ -2522,7 +2522,7 @@ def make_partition(i):
25222522
return pd.DataFrame({"a": np.random.random(10), "b": ["a"] * 10})
25232523
return pd.DataFrame({"a": np.random.random(10), "b": np.random.random(10)})
25242524

2525-
ddf = dd.from_map(make_partition, range(50))
2525+
ddf = dd.from_map(make_partition, range(50), meta={"a": float, "b": float})
25262526
with dask.config.set({"dataframe.shuffle.method": "p2p"}):
25272527
out = ddf.shuffle(on="a", ignore_index=True)
25282528

@@ -2829,7 +2829,9 @@ def make_partition(partition_id, size):
28292829
df["b"] = df["a"] % 23
28302830
return df
28312831

2832-
df = dd.from_map(make_partition, np.arange(19), args=(250,))
2832+
df = dd.from_map(
2833+
make_partition, np.arange(19), args=(250,), meta={"a": int, "b": int}
2834+
)
28332835

28342836
with dask.config.set(
28352837
{"dataframe.shuffle.method": "p2p", "distributed.p2p.storage.disk": disk}

0 commit comments

Comments
 (0)