-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
GP Covariance Function Type Hints #6740
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
… creating a new one; and implemented such that the base kernel is passed by class rather than by instance
… creating a new one; and implemented such that the base kernel is passed by class rather than by instance
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6740 +/- ##
==========================================
- Coverage 91.93% 91.46% -0.47%
==========================================
Files 95 95
Lines 16225 16238 +13
==========================================
- Hits 14916 14852 -64
- Misses 1309 1386 +77
|
Hey @jahall sorry for the delay! I (finally) enabled the test suite for you. Looks like |
@bwengals No problem! That should be mypy/tests fixed now. I'll wait till we merge this PR then will update the WrappedPeriodic PR to reflect these changes. |
@bwengals ...bit confused on the test failures ... |
They showed up in another PR, I think it's unrelated, probably something that changed with the latest PyTensor release |
Should be fixed by #6782 |
@bwengals @ricardoV94 Still seeing spurious test failure :( |
@bwengals @ricardoV94 Should be good to go now after merging latest main. |
@bwengals @ricardoV94 Thoughts? |
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.
thank you @jahall !
@staticmethod | ||
def _alloc(X, *shape: int) -> TensorVariable: | ||
return pt.alloc(X, *shape) # type: ignore | ||
|
||
|
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.
Is this factored out for mypys sake?
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.
Ah, yes, this was for mypys sake...I think because pt.alloc
can technically return things other than TensorVariable
...
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.
It cannot, but mypy doesn't understand that. If you would like ta take a look at the PyTensor level to see if it can be fixed that would be great!
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.
Sure - let me take a look
@ricardoV94 Can we merge this? |
Adding type-hints to
cov.py
. Also movingPeriodic
to appear below the other stationary kernels.New features
cov.py
📚 Documentation preview 📚: https://pymc--6740.org.readthedocs.build/en/6740/