Conversation
|
@gomezzz I've added some tests for this that work. There are a few catches. The main thing is that we don't test repeated integration for the same integrand-N-dim JIT combination (which is the point of JIT, but maybe not something we actually need to test). This is because the test suite doesn't really track
|
|
P.S One advantage of refactoring would be that we don't have to run all the tests. I'm not sure what the goal of "unit testing" JIT is besides functionality i.e., I'm not sure we actually need to check accuracy of every single integral. We're more interested in not-crashing. |
Agree :)
Any of them are okay for me. At the moment the tests take ~4min which is fine and I'll take any improvement :D |
|
@gomezzz I think I found a pretty clean way of doing this actually, so going to run with that. |
| def integrate(*args, **kwargs): | ||
| nonlocal jit_integrate | ||
| if jit_integrate is None: | ||
| jit_integrate = bl.get_jit_compiled_integrate( | ||
| dim=1, N=N, backend=backend | ||
| ) | ||
| return jit_integrate(*args, **kwargs) |
There was a problem hiding this comment.
is the redeclaration necessary? was declared just above? 🤔
There was a problem hiding this comment.
Same two comments apply to some of the other files as well, I think ✌️
|
Well that now-failing test is flaky - fails sometimes, passes others. |
let's increase the bounds on this one? 🤔 |
|
Sounds good to me |
Description
Adds tests for JIT integration
Resolved Issues
How Has This Been Tested?
Related Pull Requests