Skip to content

Commit

Permalink
PERF-modin-project#4493: Use partition size caches more in Modin data…
Browse files Browse the repository at this point in the history
…frame.

Signed-off-by: mvashishtha <[email protected]>
  • Loading branch information
mvashishtha committed May 27, 2022
1 parent 958c26a commit 83d786d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions modin/core/dataframe/pandas/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2149,17 +2149,8 @@ def _prepare_frame_to_broadcast(self, axis, indices, broadcast_all):
broadcast [self[key1], self[key2]] partitions and internal indices for `self` must be [[0, 1], [5]]
"""
if broadcast_all:

def get_len(part):
return part.width() if not axis else part.length()

parts = self._partitions if not axis else self._partitions.T
return {
key: {
i: np.arange(get_len(parts[0][i])) for i in np.arange(len(parts[0]))
}
for key in indices.keys()
}
sizes = self._column_widths if axis else self._row_lengths
return {key: dict(enumerate(sizes)) for key in indices.keys()}
passed_len = 0
result_dict = {}
for part_num, internal in indices.items():
Expand Down
2 changes: 1 addition & 1 deletion modin/core/execution/ray/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def initialize_ray(
ray_init_kwargs = {
"num_cpus": CpuCount.get(),
"num_gpus": GpuCount.get(),
"include_dashboard": False,
"include_dashboard": True,
"ignore_reinit_error": True,
"object_store_memory": object_store_memory,
"_redis_password": redis_password,
Expand Down

0 comments on commit 83d786d

Please sign in to comment.