Repository navigation
Zuko density estimators - #1088
anastasiakrouglova merged 27 commits into
Conversation
* CLN pyproject.toml * CLN optional deps comment * CLN alphabetical order
* fix x_o and broken link tutorial 7 * typo in title * suppress plotting output --------- Co-authored-by: Matthijs <[email protected]>
|
The base branch of this PR is sbi-dev:974-zuko-density-estimators-interface right now. You probably want to merge it into |
|
|
||
|
|
||
| @pytest.mark.parametrize("density_estimator", (NFlowsFlow, ZukoFlow)) | ||
| @pytest.mark.parametrize( |
There was a problem hiding this comment.
Add here the new build functions, which are not yet covered :)
There was a problem hiding this comment.
what do you exactly mean? I have a pytest function which does the following:
@pytest.mark.parametrize(
"build_density_estimator",
(
build_maf,
build_maf_rqs,
build_nsf,
build_zuko_nice,
build_zuko_maf,
build_zuko_nsf,
build_zuko_ncsf,
build_zuko_sospf,
build_zuko_naf,
build_zuko_unaf,
build_zuko_cnf,
build_zuko_gf,
build_zuko_bpf,
),
)
Or is that not enough?
manuelgloeckler
left a comment
There was a problem hiding this comment.
Hey, great work! So many new options.
I added a few comments, which should be resolved before merging into main.
As this PR wants to merge into another branch, I will already approve it.
Feel free to merge it yourself.
gmoss13
left a comment
There was a problem hiding this comment.
See comments by @manuelgloeckler et al. In the meantime, let's merge this into the the sbi-dev:974 branch, and create a new PR to merge that branch into main. In the meantime, could you close PRs #1068 and #1064, if you are no longer using them? I think they might be duplicates of this PR.
There was a problem hiding this comment.
I copied my review from #1068. Those suggestions apply once you rebase/merge the current main into your branch. You can directly commit them with "Add suggestion to batch" and then "Commit suggestion".
Let me know if I should do this directly.
Co-authored-by: Sebastian Bischoff <[email protected]>
Co-authored-by: Sebastian Bischoff <[email protected]>
Co-authored-by: Sebastian Bischoff <[email protected]>
bf65102
into
sbi-dev:974-zuko-density-estimators-interface
* update zuko to 1.1.0 * test zuko_gmm commit * build_zuko_nsf added * add build_zuko_naf, update test * add license change to pr template. * CLN pyproject.toml (#1009) * CLN pyproject.toml * CLN optional deps comment * CLN alphabetical order * fix x_o and broken link tutorial 7 (#1003) * fix x_o and broken link tutorial 7 * typo in title * suppress plotting output --------- Co-authored-by: Matthijs <[email protected]> * replace prepare_for_sbi in tutorials (#1013) * add zuko density estimators * not working gmm * update tests for PR * update PR for pyright * resolve pyright * add reportArgumentType * resolve pyright issue * resolve all issues pyright * resolve pyright * add typing and docstring * add functions from factory to test * remove comment mdn file * add docstrings flow file * add docstring in density_estimator_test.py * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * removed pyright --------- Co-authored-by: bkmi <[email protected]> Co-authored-by: Nastya Krouglova <[email protected]> Co-authored-by: Jan Boelts <[email protected]> Co-authored-by: Thomas Moreau <[email protected]> Co-authored-by: Matthijs Pals <[email protected]> Co-authored-by: Matthijs <[email protected]> Co-authored-by: zinaStef <[email protected]> Co-authored-by: Sebastian Bischoff <[email protected]>
* Zuko density estimators (#1088) * update zuko to 1.1.0 * test zuko_gmm commit * build_zuko_nsf added * add build_zuko_naf, update test * add license change to pr template. * CLN pyproject.toml (#1009) * CLN pyproject.toml * CLN optional deps comment * CLN alphabetical order * fix x_o and broken link tutorial 7 (#1003) * fix x_o and broken link tutorial 7 * typo in title * suppress plotting output --------- Co-authored-by: Matthijs <[email protected]> * replace prepare_for_sbi in tutorials (#1013) * add zuko density estimators * not working gmm * update tests for PR * update PR for pyright * resolve pyright * add reportArgumentType * resolve pyright issue * resolve all issues pyright * resolve pyright * add typing and docstring * add functions from factory to test * remove comment mdn file * add docstrings flow file * add docstring in density_estimator_test.py * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * Update sbi/neural_nets/flow.py Co-authored-by: Sebastian Bischoff <[email protected]> * removed pyright --------- Co-authored-by: bkmi <[email protected]> Co-authored-by: Nastya Krouglova <[email protected]> Co-authored-by: Jan Boelts <[email protected]> Co-authored-by: Thomas Moreau <[email protected]> Co-authored-by: Matthijs Pals <[email protected]> Co-authored-by: Matthijs <[email protected]> Co-authored-by: zinaStef <[email protected]> Co-authored-by: Sebastian Bischoff <[email protected]> * merge * hate * merge * merge * merge * merge * MERGE * remove cnf * implement changes Jan * Update sbi/neural_nets/factory.py Co-authored-by: Jan <[email protected]> * resolve issues Jan * undo changes to tutorials folder. * sort dependencies. --------- Co-authored-by: bkmi <[email protected]> Co-authored-by: Nastya Krouglova <[email protected]> Co-authored-by: Jan Boelts <[email protected]> Co-authored-by: Thomas Moreau <[email protected]> Co-authored-by: Matthijs Pals <[email protected]> Co-authored-by: Matthijs <[email protected]> Co-authored-by: zinaStef <[email protected]> Co-authored-by: Sebastian Bischoff <[email protected]> Co-authored-by: Jan <[email protected]>
What does this implement/fix? Explain your changes
We implemented the Zuko density estimators (i.e., NICE, (MAF), NSF, NCSF, SOSPF, NAF, UNAF, CNF, GF, BPF) described in https://github.com/probabilists/zuko/tree/master. The only flow that is not implemented yet, is the Gaussian Mixture Model (GMM).
Does this close any currently open issues?
Fixes # (issue)
Fixes #974
However, the implementation of Zuko GMM is still required.
Any relevant code examples, logs, error output, etc?
Any other comments?
This pull request resolve proposals Guy on Zuko integration.
Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
guidelines
with
pytest.mark.slow.guidelines
main(or there are no conflicts withmain)