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

Avoid unnecessary Index cast in IndexedFrame.index setter #15843

Conversation

charlesbluca
Copy link
Member

@charlesbluca charlesbluca commented May 23, 2024

Description

Triaging recent dask-cuda breakage led me to #15781, where it seems like the passing of an index object directly to the IndexedFrame.index setter (and therefore, wrapping of this index in an Index() constructor) has caused proxifying issues on dask-cuda's end.

cc @rjzamora @mroeschke

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@charlesbluca charlesbluca requested a review from a team as a code owner May 23, 2024 20:58
@github-actions github-actions bot added the Python Affects Python cuDF API. label May 23, 2024
@charlesbluca charlesbluca added bug Something isn't working 3 - Ready for Review Ready for review by team labels May 23, 2024
@charlesbluca charlesbluca added the non-breaking Non-breaking change label May 23, 2024
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@mroeschke
Copy link
Contributor

mroeschke commented May 23, 2024

Could we also add this simple test in python/cudf/cudf/tests/test_index.py

@pytest.mark.parametrize("index", [cudf.Index([1]), cudf.RangeIndex(1), cudf.MultiIndex(levels=[[0]], codes=[[0]])])
def test_index_assignment_no_shallow_copy(index):
    df = cudf.DataFrame(range(1))
    df.index = index
    assert df.index is index

@charlesbluca charlesbluca changed the base branch from branch-24.06 to branch-24.08 May 23, 2024 21:22
@charlesbluca
Copy link
Member Author

charlesbluca commented May 23, 2024

On recommendations from @mroeschke, retargeted this to 24.08 and opened #15844 with a simpler unblocker for the dask-cuda breakage for the sake of time.

rapids-bot bot pushed a commit that referenced this pull request May 24, 2024
Lighter weight alternative to #15843 to unblock dask-cuda's breakage.

Authors:
  - Charles Blackmon-Luca (https://github.com/charlesbluca)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #15844
@mroeschke
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 78a0314 into rapidsai:branch-24.08 May 24, 2024
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants