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

[BUG] Make name attr of Index fast slow attrs #16270

Merged
merged 12 commits into from
Jul 16, 2024

Conversation

Matt711
Copy link
Contributor

@Matt711 Matt711 commented Jul 12, 2024

Description

Debugging the spike in failures from #16234

Checklist

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

@Matt711 Matt711 added bug Something isn't working 2 - In Progress Currently a work in progress non-breaking Non-breaking change cudf.pandas Issues specific to cudf.pandas labels Jul 12, 2024
@Matt711 Matt711 self-assigned this Jul 12, 2024
@rapidsai rapidsai deleted a comment from copy-pr-bot bot Jul 12, 2024
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jul 12, 2024
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

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

Shouldn't it be name rather than _name?

python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
python/cudf/cudf/pandas/_wrappers/pandas.py Outdated Show resolved Hide resolved
@rapidsai rapidsai deleted a comment from copy-pr-bot bot Jul 12, 2024
Copy link

copy-pr-bot bot commented Jul 12, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Matt711
Copy link
Contributor Author

Matt711 commented Jul 12, 2024

/ok to test

@galipremsagar
Copy link
Contributor

/okay to test

@Matt711 Matt711 marked this pull request as ready for review July 12, 2024 17:32
@Matt711 Matt711 requested a review from a team as a code owner July 12, 2024 17:32
@Matt711 Matt711 requested review from wence- and isVoid July 12, 2024 17:32
@Matt711 Matt711 changed the title [WIP] Make name attr of Index fast slow attrs [BUG] Make name attr of Index fast slow attrs Jul 12, 2024
def name(self):
return self._fsproxy_wrapped._name


def Index__setattr__(self, name, value):
Copy link
Contributor

Choose a reason for hiding this comment

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

With the usage of _FastSlowAttribute I don't think we need Index__setattr__ anymore.

Copy link
Contributor Author

@Matt711 Matt711 Jul 12, 2024

Choose a reason for hiding this comment

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

I agree, except for MultiIndex.

edit: It might need some more customization because it doesn't just yet without Index__setattr__

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't defining names Fastslow attribute for MultiIndex just do the job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

names attr in Pandas is set with property like this. I think_set_names is not being picked up for some reason

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pd.MultiIndex([]).names = ... isn't doing anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I think we still need Index__setattr__ in Index types. This issue address the problem described here.

Copy link
Contributor

Choose a reason for hiding this comment

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

No I think we still need Index__setattr__ in Index types. This issue address the problem described here.

I feel if we do this for one attribute we will have to end up doing the same for every attribute, which is why I think there could be a better approach to solve this problem. Let's pair on this tomorrow ?

@Matt711
Copy link
Contributor Author

Matt711 commented Jul 12, 2024

/ok to test

@Matt711
Copy link
Contributor Author

Matt711 commented Jul 13, 2024

/ok to test

@Matt711 Matt711 added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jul 15, 2024
@Matt711 Matt711 added this to the Proxying - cudf.pandas milestone Jul 16, 2024
@galipremsagar
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 6219110 into rapidsai:branch-24.08 Jul 16, 2024
81 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 cudf.pandas Issues specific to cudf.pandas non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants