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

REFACTOR-#6044: remove code duplication for get_objects_from_partitions #6045

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Apr 25, 2023

What do these changes do?

  • 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 CLN: remove code duplication for get_objects_from_partitions #6044
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

…_from_partitions'

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev marked this pull request as ready for review April 25, 2023 21:32
@anmyachev anmyachev requested a review from a team as a code owner April 25, 2023 21:32
"""
if hasattr(cls, "_execution_wrapper"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if hasattr(cls, "_execution_wrapper"):
if hasattr(cls._partition_class, "execution_wrapper"):

Would this work? I am just thinking it would good for one class to keep the execution wrapper.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't really like that kind of thing. In the code below, we will materialize multiple partitions, and it will look a little strange that to materialize multiple partitions, we use the attribute of the partition, and not the manager, which is designed to work with multiple partitions.

On the other hand, all wrappers are implemented as mixins, so we can switch to inheritance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

On the other hand, all wrappers are implemented as mixins, so we can switch to inheritance.

We should probably give it a try.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we wait for #6052 in order to avoid double refactoring commits?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd like to merge it without waiting. Making these changes is faster than having to wait for the CI for this PR to complete again.

@YarShev YarShev merged commit afa442b into modin-project:master Apr 26, 2023
@anmyachev anmyachev deleted the issue6044 branch April 26, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLN: remove code duplication for get_objects_from_partitions
3 participants