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

Support numba compiled sort and argsort functions #1309

Conversation

victorgarcia98
Copy link
Contributor

@victorgarcia98 victorgarcia98 commented Mar 20, 2025

Description

This PR introduces Numba compiled function sort and argsort for certain kind of sorting algorithms that are supported by Numba (See this).

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pytensor--1309.org.readthedocs.build/en/1309/

Signed-off-by: Victor Garcia Reolid <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
@jessegrabowski
Copy link
Member

It looks like there's some syntax that isn't python 3.10 compatible. We're following the numpy depreciation schedule, so we should still support python 3.10 for one more week

Signed-off-by: Victor Garcia Reolid <[email protected]>
@victorgarcia98
Copy link
Contributor Author

It looks like there's some syntax that isn't python 3.10 compatible. We're following the numpy depreciation schedule, so we should still support python 3.10 for one more week

Aw indeed! I changed the syntax to be compatible with Python 3.10 😄

Copy link

codecov bot commented Mar 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.02%. Comparing base (a149f6c) to head (8726955).
Report is 20 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1309      +/-   ##
==========================================
+ Coverage   82.00%   82.02%   +0.01%     
==========================================
  Files         188      203      +15     
  Lines       48478    48837     +359     
  Branches     8665     8691      +26     
==========================================
+ Hits        39755    40058     +303     
- Misses       6575     6627      +52     
- Partials     2148     2152       +4     
Files with missing lines Coverage Δ
pytensor/link/numba/dispatch/basic.py 80.38% <100.00%> (+2.53%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

Some change resquests, looks great so far

Signed-off-by: Victor Garcia Reolid <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

Awesome

Signed-off-by: Victor Garcia Reolid <[email protected]>
@ricardoV94 ricardoV94 added enhancement New feature or request numba labels Apr 4, 2025
@ricardoV94 ricardoV94 changed the title feat: support numba compiled sort and argsort functions Support numba compiled sort and argsort functions Apr 4, 2025
@jessegrabowski jessegrabowski merged commit 4b1761b into pymc-devs:main Apr 4, 2025
73 checks passed
@jessegrabowski
Copy link
Member

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request numba
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants