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
test_utils to make it easier for downstream implementations to check correctness #1825
base: develop
Are you sure you want to change the base?
Conversation
gpflow/test_utils.py
Outdated
assert np.linalg.eigvals(A).min() > -tol, "test for positive semi definite matrix" | ||
|
||
|
||
def test_kernel(kernel: Kernel, X: np.ndarray, X2: np.ndarray): |
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.
Should we provide default arguments for X
and X2
?
Codecov Report
@@ Coverage Diff @@
## develop #1825 +/- ##
========================================
Coverage 98.00% 98.01%
========================================
Files 107 108 +1
Lines 5761 5785 +24
========================================
+ Hits 5646 5670 +24
Misses 115 115
Continue to review full report at Codecov.
|
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.
LGTM
Co-authored-by: Jesper Nielsen <44195043+jesnie@users.noreply.github.com>
PR type: new feature
Summary
A common use-case of GPflow is to implement your own down-stream kernels / models / likelihoods / etc.
We should make it easy for such users to check their implementation for basic correctness (e.g. kernel is pos-def on test inputs) and adherence to interfaces (accepts tensors of appropriate shapes & returns the right things).
Proposed changes
test_utils
submodule with basic checks for interfaces.Minimal working example
Release notes
Fully backwards compatible: yes
PR checklist
make format
)make check-all
)