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

[FEA] is_monotonic* properties are erroneously cached #8223

Closed
shwina opened this issue May 12, 2021 · 3 comments
Closed

[FEA] is_monotonic* properties are erroneously cached #8223

shwina opened this issue May 12, 2021 · 3 comments
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@shwina
Copy link
Contributor

shwina commented May 12, 2021

The is_monotonic* properties of Column are cached. But because Columns are not immutable, this can lead to bugs like the following:

In [5]: s
Out[5]:
0    1
1    2
2    3
3    4
4    5
dtype: int64

In [6]: s.is_monotonic_increasing
Out[6]: True

In [7]: s[2:5] = [3, 2, 1]

In [8]: s.is_monotonic_increasing
Out[8]: True

In [9]: s
Out[9]:
0    1
1    2
2    3
3    2
4    1
dtype: int64

Some discussion here.

@shwina shwina added bug Something isn't working Python Affects Python cuDF API. labels May 12, 2021
@vyasr
Copy link
Contributor

vyasr commented May 14, 2021

I will remove caching entirely in #8130, but once that PR is merged we should consider if it is possible to invalidate the cache in all cases that should, which would make caching feasible.

@harrism harrism changed the title [FEA] is_monotic* properties are erroneously cached [FEA] is_monotonic* properties are erroneously cached May 18, 2021
@shwina
Copy link
Contributor Author

shwina commented May 25, 2021

@vyasr can this issue be closed out now that #8130 is merged?

@vyasr
Copy link
Contributor

vyasr commented May 25, 2021

Yes I think so. We can revisit better caching in the future.

@vyasr vyasr closed this as completed May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

No branches or pull requests

2 participants