Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF-#6976: Do not trigger unnecessary computations on ._propagate_index_objs() #6977

Merged
merged 1 commit into from Feb 29, 2024

Conversation

dchigarev
Copy link
Collaborator

@dchigarev dchigarev commented Feb 28, 2024

What do these changes do?

Changes in this PR prevent materialization for axes that were not specified in ._propagate_index_objs()

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Unnecessary row_lengths computation on ._propagate_index_objs(axis=1) #6976
  • tests are passing
  • module layout described at docs/development/architecture.rst is up-to-date

…._propagate_index_objs()'

Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
width=self.column_widths[j],
width=(
self.column_widths[j]
if self._column_widths_cache is not None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding copy_column_widths_cache function similar to copy_columns_cache?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require changing self._column_widths_cache -> self.copy_column_widths_cache() everywhere. Adding the method also doesn't seem to help here, as we're taking individual elements, rather than the whole list:

part.add_to_apply_calls(
    ...,
    width=self.copy_column_widths_cache()[i] if self.has_column_widths_cache() else None
)

@dchigarev dchigarev marked this pull request as ready for review February 29, 2024 11:47
@anmyachev anmyachev merged commit 9adaf33 into modin-project:master Feb 29, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary row_lengths computation on ._propagate_index_objs(axis=1)
2 participants