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

Replace cpdef variables with cdef variables. #5145

Merged
merged 3 commits into from
Feb 2, 2023

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Jan 21, 2023

This PR fixes some warnings in the cuml Python build that will become errors in Cython 3. Examples follow:

cuml/python/cuml/decomposition/pca.pyx:334:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca.pyx:587:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca.pyx:683:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:282:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:398:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:450:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca_mg.pyx:94:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd_mg.pyx:77:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/fil/fil.pyx:82:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/fil/fil.pyx:83:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables

@bdice bdice requested a review from a team as a code owner January 21, 2023 02:59
@github-actions github-actions bot added the Cython / Python Cython or Python issue label Jan 21, 2023
@csadorf csadorf added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 1, 2023
Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@bdice
Copy link
Contributor Author

bdice commented Feb 1, 2023

Once CI passes I’ll need someone else to merge this. Feel free to move this to 23.04 if desired.

@codecov-commenter
Copy link

Codecov Report

Base: 67.12% // Head: 67.21% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (0511daf) compared to base (f6abf81).
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-23.02    #5145      +/-   ##
================================================
+ Coverage         67.12%   67.21%   +0.08%     
================================================
  Files               192      192              
  Lines             12396    12370      -26     
================================================
- Hits               8321     8314       -7     
+ Misses             4075     4056      -19     
Impacted Files Coverage Δ
python/cuml/common/kernel_utils.py 91.66% <0.00%> (-4.17%) ⬇️
python/cuml/dask/common/input_utils.py 34.37% <0.00%> (-1.51%) ⬇️
python/cuml/dask/ensemble/randomforestregressor.py 33.87% <0.00%> (-1.05%) ⬇️
...ython/cuml/dask/ensemble/randomforestclassifier.py 29.88% <0.00%> (-0.80%) ⬇️
python/cuml/preprocessing/TargetEncoder.py 85.22% <0.00%> (-0.08%) ⬇️
...on/cuml/benchmark/automated/bench_random_forest.py 0.00% <0.00%> (ø)
python/cuml/dask/preprocessing/label.py 40.00% <0.00%> (+0.71%) ⬆️
...ython/cuml/dask/neighbors/kneighbors_classifier.py 23.42% <0.00%> (+1.57%) ⬆️
python/cuml/dask/neighbors/nearest_neighbors.py 28.75% <0.00%> (+2.00%) ⬆️
python/cuml/dask/neighbors/kneighbors_regressor.py 32.75% <0.00%> (+2.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vyasr
Copy link
Contributor

vyasr commented Feb 2, 2023

/merge

@rapids-bot rapids-bot bot merged commit b4e511e into rapidsai:branch-23.02 Feb 2, 2023
jakirkham pushed a commit to jakirkham/cuml that referenced this pull request Feb 27, 2023
This PR fixes some warnings in the cuml Python build that will become errors in Cython 3. Examples follow:
```
cuml/python/cuml/decomposition/pca.pyx:334:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca.pyx:587:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca.pyx:683:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:282:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:398:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd.pyx:450:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/pca_mg.pyx:94:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/decomposition/tsvd_mg.pyx:77:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/fil/fil.pyx:82:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
cuml/python/cuml/fil/fil.pyx:83:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
```

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - William Hicks (https://github.com/wphicks)
  - Carl Simon Adorf (https://github.com/csadorf)

URL: rapidsai#5145
@bdice bdice deleted the cdef-cython-3 branch May 9, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants