-
Notifications
You must be signed in to change notification settings - Fork 155
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
issue #568 : small embedding net as default #624
Conversation
Great, thanks! |
@janfb is this ok to merge for you? The PR adds a one-layer neural network as default embedding net |
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.
Ok unfortunately tests are failing. It seems that the net does not infer the shape of x
correctly
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.
Looks good, thanks for tackling this!
One remark: what is the overhead of this? What the difference in training speed of the default settings, e.g., NPE with maf
, or NRE with resnet
(since it uses two embeddings), with and without the new default embedding?
Could we run a small benchmark, just to get an impression?
What about now? |
Just started running them. You can also run them locally with |
still failing unfortunately |
I fixed it, but it's not so pretty.. You might want to have a look! The remaining test failures are linked to performance issues in |
I don't know why, but checking the type with |
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.
I think the current solution is ok. I left some comments that should make it a bit more readable.
Looks good now, thanks! Have you ran a small experiment to compare the runtimes with and without DefaultEmbedding? |
No, not yet! Any suggestions which benchmarking example I should use for that and where I should implement that? Also, how do you measure the runtimes, just to be on the same page. |
My bigger concern is that some tests are failing because of their c2st right now. I'm a bit worried that the default embedding net impedes performance for small models such as the ones we run in our tests. If that is the case, we should reconsider using a DefaultEmbeddingNet. Could you run slow tests with |
Hm, no, the whole thing should take about 2-3 hours. Not sure what's going wrong here. You can also run specific tests with |
I am able to reproduce the failing tests for |
Nice catch! I did the same for the others and the tests pass now! |
ok cool! Plus, there is a merge conflict in |
Yeah for me it's stuck too! And the merge conflict is because someone added checks in the |
Update @JuliaLinhart : setting |
I'm running the slow tests again now |
On my side all tests pass now |
Codecov Report
@@ Coverage Diff @@
## main #624 +/- ##
==========================================
+ Coverage 68.72% 70.69% +1.97%
==========================================
Files 67 68 +1
Lines 4476 4713 +237
==========================================
+ Hits 3076 3332 +256
+ Misses 1400 1381 -19
Flags with carried forward coverage won't be shown. Click here to find out more.
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.
Thanks a lot, it looks good to me now and tests are passing!
One final question: for some test cases you increased the number of simulations quite a lot, is this necessary? E.g., are these number lower bounds on making the tests pass?
Alright, we can merge this into git pull upstream main --rebase
|
Yes I forgot to create a branch.. 🤭 |
no problem :) but there is one conflict, see below You probably have to rebase again on the most recent |
hmm I really cannot see that..
|
it seems you haven't set git remote add upstream https://github.com/mackelab/sbi.git helps? |
There @michaeldeistler, should work now!