Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Zuko density estimators#1088

Conversation

anastasiakrouglova
Copy link
Collaborator

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 inhttps://github.com/probabilists/zuko/tree/master. The only flow that is not implemented yet, is theGaussian 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 anx in the boxes that apply. You can also fill these out after creating
the 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.

  • I have read and understood thecontribution
    guidelines
  • I agree with re-licensing my contribution from AGPLv3 to Apache-2.0.
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have reported how long the new tests run and potentially marked them
    withpytest.mark.slow.
  • New and existing unit tests pass locally with my changes
  • I performed linting and formatting as described in thecontribution
    guidelines
  • I rebased onmain (or there are no conflicts withmain)

@Baschdl
Copy link
Contributor

The base branch of this PR issbi-dev:974-zuko-density-estimators-interface right now. You probably want to merge it intomain. There is an option to change it.



@pytest.mark.parametrize("density_estimator", (NFlowsFlow, ZukoFlow))
@pytest.mark.parametrize(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Add here the new build functions, which are not yet covered :)

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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?

Copy link
Contributor

@manuelgloecklermanuelgloeckler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

Copy link
Contributor

@gmoss13gmoss13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

manuelgloeckler and anastasiakrouglova reacted with thumbs up emoji
Copy link
Contributor

@BaschdlBaschdl left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I copied my review from#1068. Those suggestions apply once you rebase/merge the currentmain 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.

Nastya Krouglovaand others added6 commitsMarch 27, 2024 15:18
Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>
Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>
Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>
@anastasiakrouglovaanastasiakrouglova merged commitbf65102 intosbi-dev:974-zuko-density-estimators-interfaceMar 27, 2024
1 of 3 checks passed
janfb added a commit that referenced this pull requestApr 5, 2024
* 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 <matthijs@example.com>* 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.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* Update sbi/neural_nets/flow.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* Update sbi/neural_nets/flow.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* removed pyright---------Co-authored-by: bkmi <12955549+bkmi@users.noreply.github.com>Co-authored-by: Nastya Krouglova <nastyakrouglova@Nastyas-MacBook-Pro.local>Co-authored-by: Jan Boelts <jan.boelts@mailbox.org>Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>Co-authored-by: Matthijs Pals <34062419+Matthijspals@users.noreply.github.com>Co-authored-by: Matthijs <matthijs@example.com>Co-authored-by: zinaStef <49067201+zinaStef@users.noreply.github.com>Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>
janfb added a commit that referenced this pull requestApr 5, 2024
* 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 <matthijs@example.com>* 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.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* Update sbi/neural_nets/flow.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* Update sbi/neural_nets/flow.pyCo-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* removed pyright---------Co-authored-by: bkmi <12955549+bkmi@users.noreply.github.com>Co-authored-by: Nastya Krouglova <nastyakrouglova@Nastyas-MacBook-Pro.local>Co-authored-by: Jan Boelts <jan.boelts@mailbox.org>Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>Co-authored-by: Matthijs Pals <34062419+Matthijspals@users.noreply.github.com>Co-authored-by: Matthijs <matthijs@example.com>Co-authored-by: zinaStef <49067201+zinaStef@users.noreply.github.com>Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>* merge* hate* merge* merge* merge* merge* MERGE* remove cnf* implement changes Jan* Update sbi/neural_nets/factory.pyCo-authored-by: Jan <janfb@users.noreply.github.com>* resolve issues Jan* undo changes to tutorials folder.* sort dependencies.---------Co-authored-by: bkmi <12955549+bkmi@users.noreply.github.com>Co-authored-by: Nastya Krouglova <nastyakrouglova@Nastyas-MacBook-Pro.local>Co-authored-by: Jan Boelts <jan.boelts@mailbox.org>Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>Co-authored-by: Matthijs Pals <34062419+Matthijspals@users.noreply.github.com>Co-authored-by: Matthijs <matthijs@example.com>Co-authored-by: zinaStef <49067201+zinaStef@users.noreply.github.com>Co-authored-by: Sebastian Bischoff <sebastian@salzreute.de>Co-authored-by: Jan <janfb@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@francois-rozetfrancois-rozetfrancois-rozet left review comments

@famurafamurafamura left review comments

@BaschdlBaschdlBaschdl requested changes

@manuelgloecklermanuelgloecklermanuelgloeckler approved these changes

@gmoss13gmoss13gmoss13 approved these changes

@bkmibkmiAwaiting requested review from bkmi

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

11 participants
@anastasiakrouglova@Baschdl@francois-rozet@famura@manuelgloeckler@gmoss13@bkmi@janfb@tomMoral@Matthijspals@zinaStef

[8]ページ先頭

©2009-2025 Movatter.jp