-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bump PyTensor and support numpy>2.0 and Python 3.13 #7688
base: main
Are you sure you want to change the base?
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
4dd5dbf
to
2486a34
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.66% -0.05%
==========================================
Files 107 107
Lines 18391 18313 -78
==========================================
- Hits 17050 16969 -81
- Misses 1341 1344 +3
|
Closes #7592
Closes #7551
Closes #7417
📚 Documentation preview 📚: https://pymc--7688.org.readthedocs.build/en/7688/