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
Move post_init check into eval for kernels which provide it. #148
Conversation
Bumping this -- in case a maintainer can run the approved workflows (which I don't have access to). |
Whoops - sorry for being slow! I've had a crazy couple of weeks. Thanks for the ping. |
@dfm Ah, so it looks like I need to change some of the tests - where you explicitly check for the failures I've moved. |
Hi @dfm -- sorry for the delay on finishing this (research and all). How do you want to handle # Check for dimension issues when multiplied and evaluated.
with pytest.raises(ValueError):
k = jnp.ones(3) * kernels.Matern32(1.5)
k.evaluate(v, v) with this change, users are allowed to create And, just to remind ourselves why I motivated this change (it's been a few weeks) -- sometimes I want to return kernels out of |
@femtomc — Absolutely no worries! This looks like a good approach, the only change I would make would be to isolate the test, i.e.: # Check for dimension issues when multiplied and evaluated.
k = jnp.ones(3) * kernels.Matern32(1.5)
with pytest.raises(ValueError):
k.evaluate(v, v) to make it a bit clearer. Otherwise I'm happy with this! |
The docs failure isn't related to this PR - can you rebase when you get a chance? For the "news" failure, can you add a file called Finally: can you also add your info to the |
Thank you! Hopefully all done. |
Oops -- I missed your comment about isolating the test. Will fix. |
* adding metadata for @elcorto * adding news item * adding info for @theorashid and @yadav-sachin * adding info for @tkillestein * Adding @tronsgaard
… into femtomc-mrb/move_eval_check
Thanks @femtomc!! 🚀 |
@dfm Sorry -- I SNAFU'd my other PR on accident with my poor local
git
abilities.This is a continuation of #146 -- and moves the
post_init
check intoevaluate
for kernels which perform the check.Re -- I'm not sure if my moving of
assert ...
until after the checks will mess up typechecking -- let me know if you end up having a moment.