Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev committed Apr 12, 2024
1 parent 40b5569 commit b589d27
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def deploy_axis_func(
*partitions,
),
f_kwargs={
"min_block_size": MinPartitionSize.get(),
"lengths": lengths,
"manual_partition": manual_partition,
"min_block_size": MinPartitionSize.get(),
},
num_returns=result_num_splits * (1 + cls._PARTITIONS_METADATA_LEN),
pure=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def deploy_axis_func(
f_len_args=len(f_args),
f_kwargs=f_kwargs,
manual_partition=manual_partition,
lengths=lengths,
min_block_size=MinPartitionSize.get(),
lengths=lengths,
return_generator=True,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def deploy_axis_func(
maintain_partitioning,
*partitions,
manual_partition=manual_partition,
lengths=lengths,
min_block_size=MinPartitionSize.get(),
lengths=lengths,
)

@classmethod
Expand Down
8 changes: 6 additions & 2 deletions modin/core/storage_formats/pandas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import numpy as np
import pandas

from modin.config import NPartitions
from modin.config import MinPartitionSize, NPartitions


def compute_chunksize(axis_len: int, num_splits: int, min_block_size: int) -> int:
Expand Down Expand Up @@ -251,7 +251,11 @@ def merge_partitioning(left, right, axis=1):

if lshape is not None and rshape is not None:
res_shape = sum(lshape) + sum(rshape)
chunk_size = compute_chunksize(axis_len=res_shape, num_splits=NPartitions.get())
chunk_size = compute_chunksize(
axis_len=res_shape,
num_splits=NPartitions.get(),
min_block_size=MinPartitionSize.get(),
)
return ceil(res_shape / chunk_size)
else:
lsplits = left._partitions.shape[axis]
Expand Down

0 comments on commit b589d27

Please sign in to comment.