-
Notifications
You must be signed in to change notification settings - Fork 108
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
Torch dispatch for scipy-like functions and Softplus #1066
base: main
Are you sure you want to change the base?
Conversation
I'm okay with closing this, just want to get your thoughts on it in relation to #1065 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1066 +/- ##
==========================================
+ Coverage 81.95% 82.10% +0.15%
==========================================
Files 182 183 +1
Lines 47866 47933 +67
Branches 8622 8633 +11
==========================================
+ Hits 39228 39357 +129
+ Misses 6472 6410 -62
Partials 2166 2166
|
This looks fine why did you ask about closing it? Can you add some small tests for one of the scipy ops and the softplus? |
@@ -4,6 +4,7 @@ | |||
import numpy as np | |||
import pytest | |||
|
|||
import pytensor.tensor as pt |
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.
We prefer to use explicit imports as a policy. In your case import expit and softplus directly
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.
Looks great, just a nit in the tests
Description
I was goofing around with pymc using the pytorch backend. I implemented a beta binomial model and had an issue when supporting some scipy methods, and was missing softplus. I wrote some small shims. Let me know your thoughts on the importlib stuff.
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1066.org.readthedocs.build/en/1066/