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

FEAT-#7001: Do not force materialization in MetaList.__getitem__() #7006

Merged
merged 3 commits into from Mar 6, 2024

Conversation

AndreyPavlenko
Copy link
Collaborator

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 Do not force materialization in MetaList.__getitem__() #7001
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

@AndreyPavlenko AndreyPavlenko force-pushed the issue-7001 branch 2 times, most recently from 2f1b6a2 to d9c4ead Compare March 5, 2024 00:53
…etitem__()

Signed-off-by: Andrey Pavlenko <andrey.a.pavlenko@gmail.com>
obj = self.meta._obj
return obj[self.idx] if isinstance(obj, list) else obj

def map(self, materialized):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am kind of confused why this method is named map. Can you elaborate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The main idea is to apply some calculation to a single materialized object and get one or multiple values. List with lengths is mapped to multiple lengths with MetaListMapper. Length is mapped to a different length with SlicedLenMapper.
If it's confusing, I let's rename it fo, for example, transfrom.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed to MaterializationHook.

YarShev
YarShev previously approved these changes Mar 5, 2024
@YarShev
Copy link
Collaborator

YarShev commented Mar 5, 2024

@dchigarev, any comments?

Copy link
Collaborator

@dchigarev dchigarev left a comment

Choose a reason for hiding this comment

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

left minor comments, otherwise LGTM, will check performance and respond with an approval

UPD: checked performance for the reproducer from #6948 and everything is fine

Co-authored-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
@YarShev YarShev merged commit 7a5919e into modin-project:master Mar 6, 2024
45 checks passed
anmyachev pushed a commit to anmyachev/modin that referenced this pull request Mar 6, 2024
…etitem__() (modin-project#7006)

Co-authored-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
Signed-off-by: Andrey Pavlenko <andrey.a.pavlenko@gmail.com>
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.

Do not force materialization in MetaList.__getitem__()
3 participants