-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bump PyTensor and support numpy>2.0 and Python 3.13 #7688
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
Conversation
15722b5
to
7721a0d
Compare
@_class_or_instancemethod | ||
@property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 3.13 stopped allowing chaining property and classmethods
mypy seems to be tripped by new type-hint stuff in numpy? |
583489b
to
5e5c72e
Compare
@@ -369,7 +369,7 @@ def get_support_shape( | |||
support_shape_offset = [0] * ndim_supp | |||
elif isinstance(support_shape_offset, int): | |||
support_shape_offset = [support_shape_offset] * ndim_supp | |||
inferred_support_shape: Sequence[int | np.ndarray | Variable] | None = None | |||
inferred_support_shape: Sequence[int | np.ndarray | TensorVariable] | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mypy complains correctly that -
is not defined for base Variable classes
if active_dims is None: | ||
self.active_dims = np.arange(input_dim) | ||
else: | ||
self.active_dims = np.asarray(active_dims, int) | ||
|
||
if max(self.active_dims) > self.input_dim: | ||
if self.active_dims.max() > self.input_dim: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy is dumb
@@ -876,7 +876,7 @@ def sample_posterior_predictive( | |||
try: | |||
with progress: | |||
task = progress.add_task("Sampling ...", completed=0, total=samples) | |||
for idx in np.arange(samples): | |||
for idx in range(samples): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mypy doesn't like one iterating over arange anymore. Anwyay I don't think that we need to, so I'll let it have its way
62a898f
to
95cf770
Compare
eea3e13
to
8c90429
Compare
We seem to have a lingering test failing due to pymc-devs/pytensor#1242 Everything else is green! |
8c90429
to
4dd5dbf
Compare
2486a34
to
c69924b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7688 +/- ##
==========================================
- Coverage 92.70% 92.67% -0.04%
==========================================
Files 107 107
Lines 18391 18313 -78
==========================================
- Hits 17050 16971 -79
- Misses 1341 1342 +1
|
Can we expose the new |
I would rather not do it here |
c69924b
to
f509f02
Compare
f509f02
to
be342ff
Compare
Closes #7592
Closes #7551
Closes #7417
📚 Documentation preview 📚: https://pymc--7688.org.readthedocs.build/en/7688/