Skip to content

Conversation

Armavica
Copy link
Member

@Armavica Armavica commented Feb 27, 2025

Description

Related Issue

  • Closes #
  • Related to #

Checklist

Type of change

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

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

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.65%. Comparing base (b05acfd) to head (04b2d67).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   81.67%   81.65%   -0.03%     
==========================================
  Files         232      232              
  Lines       53132    53078      -54     
  Branches     9410     9405       -5     
==========================================
- Hits        43396    43340      -56     
- Misses       7283     7285       +2     
  Partials     2453     2453              
Files with missing lines Coverage Δ
pytensor/link/c/basic.py 87.74% <100.00%> (-0.02%) ⬇️
pytensor/link/numba/dispatch/elemwise.py 94.82% <100.00%> (ø)
pytensor/npy_2_compat.py 100.00% <100.00%> (ø)
pytensor/tensor/basic.py 91.80% <100.00%> (ø)
pytensor/tensor/blas.py 73.52% <100.00%> (ø)
pytensor/tensor/einsum.py 97.11% <100.00%> (+0.01%) ⬆️
pytensor/tensor/elemwise.py 90.01% <100.00%> (ø)
pytensor/tensor/extra_ops.py 88.54% <100.00%> (-0.02%) ⬇️
pytensor/tensor/math.py 92.86% <100.00%> (-0.02%) ⬇️
pytensor/tensor/nlinalg.py 94.98% <100.00%> (ø)
... and 5 more

... and 2 files with indirect coverage changes

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

@ricardoV94
Copy link
Member

Does this mean we can also drop numpy<2 and related CI matrix?

@Armavica
Copy link
Member Author

Yeah I think that the plan was to drop numpy < 2.0 and python 3.10 together if I remember correctly

@ricardoV94
Copy link
Member

Let's do it. There is stuff in npy_compat as well

@Armavica
Copy link
Member Author

There is stuff remaining but I want to check this for now.

@Armavica Armavica changed the title Drop Python 3.10 Drop Python 3.10 and NumPy < 2 Sep 30, 2025
else:
# The value here doesn't matter, it won't be used
c_axis = numpy_axis_is_none_flag
c_axis = np.iinfo(np.int32).min # the value of NPY_RAVEL_AXIS
Copy link
Member

Choose a reason for hiding this comment

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

Seems better to have this computed in one of the util files with the more readable name?

Copy link
Member Author

Choose a reason for hiding this comment

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

But in this case, if the value actually doesn't matter as the comment says, perhaps we can even use 0?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that seems right

@Armavica
Copy link
Member Author

I was wondering if I need to increment the c code version after removing the compatibility headers?

@ricardoV94
Copy link
Member

I was wondering if I need to increment the c code version after removing the compatibility headers?

I don't think so, the generated C code didn't change if you are using numpy>2.0, and you can't use the old one anymore now. Could be wrong ofc

@Armavica
Copy link
Member Author

I don't think so, the generated C code didn't change if you are using numpy>2.0

Even with this commit? a0ad246

@ricardoV94
Copy link
Member

Even with this commit? a0ad246

Can you check if we bumped the C versions when we added that header thing to those Ops? If we did, then maybe let's be safe and bump again

Comment on lines 100 to 102
- fast-compile: 1
- float32: 1
- python-version: "3.13"
Copy link
Member

Choose a reason for hiding this comment

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

I couldn't comment with suggestion on the phone, but these are excluding all fast-compile/float32/python 3.13 runs. They only made sense in combination with numpy version (we were trying not to blow the CI when we added the numpy variants)

Suggested change
- fast-compile: 1
- float32: 1
- python-version: "3.13"

@Armavica
Copy link
Member Author

Armavica commented Sep 30, 2025

Can you check if we bumped the C versions when we added that header thing to those Ops? If we did, then maybe let's be safe and bump again

This is the commit that introduced that header, it changed the C code in other ways too but it did bump the C versions: 0aa10c0

@ricardoV94
Copy link
Member

Right, let's rebump then. Thanks for checking it

@Armavica Armavica force-pushed the drop-3.10 branch 3 times, most recently from 463e252 to 5a8976b Compare October 1, 2025 11:56
@Armavica Armavica marked this pull request as ready for review October 1, 2025 12:55
@Armavica Armavica requested a review from ricardoV94 October 3, 2025 17:57

# We must always add the numpy ABI version here as
# DynamicModule always add the include <numpy/arrayobject.h>
ndarray_c_version = _get_ndarray_c_version()
Copy link
Member

Choose a reason for hiding this comment

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

How slow is this? Do we want to execute ot only once perhaps?

@ricardoV94
Copy link
Member

looks good just a small question

@Armavica Armavica force-pushed the drop-3.10 branch 2 times, most recently from 8b375f4 to e28ba52 Compare October 5, 2025 09:03
@ricardoV94
Copy link
Member

Thanks a ton @Armavica

Anything else missing?

@Armavica
Copy link
Member Author

Armavica commented Oct 5, 2025

Thanks a ton @Armavica

Anything else missing?

I can't think of anything else

@ricardoV94
Copy link
Member

The PyPI CI seems to be failing

@Armavica
Copy link
Member Author

Armavica commented Oct 7, 2025

Not sure what this is about, I will debug in a few days

@ricardoV94
Copy link
Member

I think it's trying to build something with python 3.10. Also are you rebased from main?

@ricardoV94
Copy link
Member

ricardoV94 commented Oct 7, 2025

Specifically this job may need the python version specified (the one above build_universal_wheel specifies it for example):

name: Check dist

@Armavica
Copy link
Member Author

Armavica commented Oct 7, 2025

Specifically this job may need the python version specified (the one above build_universal_wheel specifies it for example):

name: Check dist

Thank you, it looks like that did the trick

@ricardoV94
Copy link
Member

LGTM. I asked @lucianopaz and @maresb to also take a look in case they spot something else problematic. Specifically I suspect @maresb needs to be in the loop for the conda release anyway

Copy link
Contributor

@maresb maresb left a comment

Choose a reason for hiding this comment

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

Thanks @Armavica! I'll be ready for this on the conda-forge side.

@ricardoV94 ricardoV94 merged commit 5227759 into pymc-devs:main Oct 7, 2025
59 checks passed
@ricardoV94
Copy link
Member

Thanks again @Armavica

@Armavica Armavica deleted the drop-3.10 branch October 8, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants