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-#7203: Make sure modin works correctly with pandas, which uses pyarrow as a backend #7204

Merged
merged 59 commits into from May 14, 2024

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Apr 19, 2024

What do these changes do?

Blocked by #7199

The main idea is to disable type precomputation for a dataframe created using pyarrow backend for pandas. For this purpose, additional information obtained when creating internal PandasDataframe is used. Dataframes created from such a dataframe inherit this information. Enabling type precomputation occurs after the types are materialized, if the backend is default. This can also happen when calling astype function. This solution is not the fastest in terms of performance, but it is the most reliable and easiest to support.

  • 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 Modin should work correctly with pandas, which uses pyarrow as a backend #7203
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
… which uses pyarrow as a backend

Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
Signed-off-by: Anatoly Myachev <[email protected]>
@anmyachev
Copy link
Collaborator Author

anmyachev commented May 14, 2024

Blocked on #7264.

@anmyachev anmyachev marked this pull request as ready for review May 14, 2024 09:13
# meaning that we shouldn't try computing a new dtype for this column,
# so marking it as 'unknown'
i: (
pandas.api.types.pandas_dtype(float)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IIUC there is no point in filling nans with this value, since this will be done later in the code.

Signed-off-by: Anatoly Myachev <[email protected]>
anmyachev and others added 2 commits May 14, 2024 15:54
modin/tests/pandas/dataframe/test_binary.py Outdated Show resolved Hide resolved
modin/pandas/utils.py Show resolved Hide resolved
modin/core/storage_formats/base/query_compiler.py Outdated Show resolved Hide resolved
modin/pandas/dataframe.py Outdated Show resolved Hide resolved
modin/pandas/dataframe.py Outdated Show resolved Hide resolved
modin/core/storage_formats/pandas/groupby.py Show resolved Hide resolved
Signed-off-by: Anatoly Myachev <[email protected]>
YarShev
YarShev previously approved these changes May 14, 2024
Copy link
Collaborator

@YarShev YarShev left a comment

Choose a reason for hiding this comment

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

LGTM! Left some minor comments.

Signed-off-by: Anatoly Myachev <[email protected]>
@anmyachev anmyachev merged commit aa6e5c2 into modin-project:main May 14, 2024
54 checks passed
@anmyachev anmyachev deleted the issue7203 branch May 14, 2024 19:44
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.

Modin should work correctly with pandas, which uses pyarrow as a backend
2 participants