Skip to content

Commit

Permalink
FIX-#2498: Fix possible number of partitions for Dask engine (#2532)
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Yaroslav <[email protected]>
  • Loading branch information
YarShev authored Dec 16, 2020
1 parent d13fe74 commit d8d58bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions modin/pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def _update_engine(publisher: Parameter):

dask_client = Client(n_workers=CpuCount.get())

num_cpus = len(dask_client.ncores())

elif publisher.get() == "Cloudray":
from modin.experimental.cloud import get_connection

Expand Down
4 changes: 2 additions & 2 deletions modin/pandas/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def test_read_csv_col_handling(
None,
{
"col1": lambda x: np.int64(x) * 10,
"col2": pd.to_datetime,
"col2": pandas.to_datetime,
"col4": lambda x: x.replace(":", ";"),
},
],
Expand Down Expand Up @@ -748,7 +748,7 @@ def test_read_csv_nans_handling(
@pytest.mark.parametrize("infer_datetime_format", [True, False])
@pytest.mark.parametrize("keep_date_col", [True, False])
@pytest.mark.parametrize(
"date_parser", [None, lambda x: pd.datetime.strptime(x, "%Y-%m-%d")]
"date_parser", [None, lambda x: pandas.datetime.strptime(x, "%Y-%m-%d")]
)
@pytest.mark.parametrize("dayfirst", [True, False])
@pytest.mark.parametrize("cache_dates", [True, False])
Expand Down

0 comments on commit d8d58bb

Please sign in to comment.