Closed maho3 closed 10 months ago
Attention: 31 lines
in your changes are missing coverage. Please review.
Comparison is base (
8b8b3e8
) 85.26% compared to head (d2bb43a
) 84.86%. Report is 2 commits behind head on main.:exclamation: Current head d2bb43a differs from pull request most recent head 1e437c6. Consider uploading reports for the commit 1e437c6 to get more accurate results
Files | Patch % | Lines |
---|---|---|
ili/utils/distributions_pt.py | 80.79% | 29 Missing :warning: |
ili/inference/runner_sbi.py | 50.00% | 1 Missing :warning: |
ili/utils/distributions_tf.py | 96.96% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Added designated prior tests in both pydelfi and sbi. Also, I added a custom TruncatedNormal distribution in sbi, to mirror that of pydelfi and to show how one can make a custom pytorch distribution.
Thank you for adding these. Perhaps I missed it last time, but given that you've added Dirichlet
and LowRankMultivariateNormal
to ili.utils.distributions_pt
, these should also be included in the unit tests. It would also be good to see unit tests for all the methods of the classes introduced in ili.utils.distributions_pt
and ili.utils.distributions_tf
Ready for review again!
This adds two new files,
ili.utils.distributions_pt.py
andili.utils.distributions_tf.py
, which wrap pytorch and pydelfi distributions, respectively, to make them more amenable to our configurations.Now, users can simply go:
to get an appropriate prior distribution. The change is the same in the yaml configs.
Features:
distributions_pt.py
ordistributions_tf.py
are dynamically loaded dependent on the backend. Everything is then imported directly intoili.utils
distributions_pt.py
wraps all continuous, univariate distributions available intorch.distributions
with an Independent version. It also preloads several multivariate distributions, so they can be accessed withili.utils