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
GP do not fail when xdims cannot be constant folded #7111
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7111 +/- ##
==========================================
- Coverage 90.20% 85.66% -4.54%
==========================================
Files 101 101
Lines 16961 16961
==========================================
- Hits 15299 14530 -769
- Misses 1662 2431 +769
|
pymc/gp/cov.py
Outdated
) | ||
try: | ||
# For the HSGP.prior_linearized use case, it's OK if X is not constant. | ||
[xdims] = constant_fold([xdims], raise_not_constant=True) |
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.
You can change to raise_not_constant=False, no point in having a try except
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 ok, done
02f190d
to
9c5cd15
Compare
9c5cd15
to
440079b
Compare
@bwengals I rebased the PR and split the two logical commits. |
Description
Closes #7000. Going with @ricardoV94's suggestion of try/except, from the comments in that issue.
Related Issue
HSGP.prior_linearized
example raises error #7000Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7111.org.readthedocs.build/en/7111/