Add a forward-only task to sbibm#19
Conversation
|
I am not yet 100% happy with the naming scheme. I also observed that no tasks appear to have unit tests. |
|
Thanks for starting off a PR! Perhaps it would be best to have a general unit tests that checks all tasks in the same way and consider more specific ones on a per-task basis? |
- renamed classes and files accordingly - added low level tests to know that the pytorch/pyro api is used correctly
|
|
The code is pretty much done at this point. the simulate step for @jan-matthis please review. |
- the covariance matrix for MultivariateNormal is constructed in such a fashion, that it cannot be anything else than positive semi-definite - keeping `validate_args=True` produced a tremendous slowdown (4x and more)
|
alright, this PR is ready to go from my side. Studying the other tasks, I see that my application tends to be somewhat special as I simulate an entire dense representation. So I am happy to receive any feedback on that. I'll check now, how to obtain benchmark results on this task. |
|
Great, I will review it tomorrow |
jan-matthis
left a comment
There was a problem hiding this comment.
I left some first comments on the PR
| @@ -0,0 +1,402 @@ | |||
| import numpy as np | |||
There was a problem hiding this comment.
Great! Can we factor some of these tests out into a separate PR that adds generic tests for all tasks?
There was a problem hiding this comment.
Can you make a concrete proposal?
My suggestion: I am happy to send another PR for test_two_moons.py while keeping test_norefposterior.py.
What do you think?
There was a problem hiding this comment.
I will hopefully have time to work on the tests and #23 tomorrow, or Wednesday latest, and make a concrete proposal then. Cheers
There was a problem hiding this comment.
Cheers for opening #29 -- I'd suggest we parametrize those tests to run for all tasks, that's what I had in mind when I asked about "generic tests" above
There was a problem hiding this comment.
ok, I propose to merge this first and then adopt it in #29 or a subsequent PR.
|
Could you rebase on |
|
huh, I thought I did so last night. Let me check. |
|
Done, I hope. |
jan-matthis
left a comment
There was a problem hiding this comment.
Looks great overall, only a few comments
d5ef8a5 to
365ee41
Compare
|
Sorry folks, I hand-cuffed myself by using |
|
I hope I have addressed all comments now. Sorry for the mess with the accidental rebase. |
|
No worries at all -- unfortunately, I think something is not quite right yet: Currently the PR still contains changes are on the main branch already |
|
Not sure what you mean. github says this PR has no conflicts. I just did a manual |
|
I think you resolved the issue with commit I assume this is ready to be merged then -- or should we rather do #29 first? 🎉 |
|
Let's wait for #29 to be merged first. Then I will close this PR, split the code according to #29 and resubmit a new PR. One merit of this is also, that this very long conversation gets squashed into a handful of commits. Feel free to disagree. Quite frankly: I'd love to get on with stuff and start running experiments. |
|
#29 is merged -- so only this one is left -- almost done |
|
closed in favor of #34 |
this PR paves the way to allow users to add simulations without a reference posterior. This way, (I hope) it becomes easier for users to test drive and benchmark sbi for their use case even.
Closes #19