Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Retribution98 committed Jul 16, 2024
1 parent aadac56 commit 7e9073d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions modin/core/dataframe/pandas/partitioning/partition_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def broadcast_axis_partitions(
then the number of splits is preserved.
apply_indices : list of ints, default: None
Indices of `axis ^ 1` to apply function over.
send_all_right: bool, default: True
send_all_right : bool, default: True
Whether or not to pass all right axis partitions to each of the left axis partitions.
enumerate_partitions : bool, default: False
Whether or not to pass partition index into `apply_func`.
Expand Down Expand Up @@ -662,8 +662,7 @@ def broadcast_apply(
right,
):
"""
Broadcast the `right` partitions to `left` and apply `apply_func` function
using different approaches to achieve the best performance.
Broadcast the `right` partitions to `left` and apply `apply_func` function using different approaches to achieve the best performance.
Parameters
----------
Expand All @@ -681,12 +680,9 @@ def broadcast_apply(
np.ndarray
NumPy array of result partition objects.
"""
# The condition for the execution of `broadcast_apply` is different from
# the same condition in the `map_partitions`, since the columnar partitioning approach
# cannot be implemented for the `apply`. This is due to the fact that different
# partitions of the left and right dataframes are possible for the `apply`,
# as a result of which it is necessary to merge partitions on both axes at once,
# which leads to large slowdowns.
# The `broadcast_apply` runtime condition differs from
# the same condition in `map_partitions` because the columnar
# approach for `broadcast_apply` results in a slowdown.
if np.prod(left.shape) <= 1.5 * CpuCount.get():
# block-wise broadcast
new_partitions = cls.base_broadcast_apply(
Expand Down

0 comments on commit 7e9073d

Please sign in to comment.