Skip to content

1032 merge the first two tutorials and simplify - #1076

Merged
augustes merged 10 commits into
mainfrom
1032-merge-the-first-two-tutorials-and-simplify
Mar 21, 2024
Merged

augustes merged 10 commits into
mainfrom
1032-merge-the-first-two-tutorials-and-simplify

Conversation

@augustes

@augustes augustes commented Mar 21, 2024 •

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes

  • Merges tutorial 0 getting started and 2 flexible inference into one tutorial.
  • Gives instructions on order of tutorials for sbi (first time) users and contributers in tutorial readme
  • Removes 1 line inference example from README

Does this close any currently open issues?

Fixes # (issue)
1032 merge the first two tutorials and simplify

Any relevant code examples, logs, error output, etc?

3 line inference in README

from sbi.inference import SNPE
# import your simulator, define your prior over the parameters
# sample parameters theta and observations x
inference = SNPE(prior=prior)
_ = inference.append_simulations(theta, x).train()
posterior = inference.build_posterior()

Any other comments?

Remember to update docs on website

Checklist

Put an x 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 the contribution
    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
    with pytest.mark.slow.
  • New and existing unit tests pass locally with my changes
  • I performed linting and formatting as described in the contribution
    guidelines
  • I rebased on main (or there are no conflicts with main)

@augustes augustes linked an issue Mar 21, 2024 that may be closed by this pull request
5 tasks done
@augustes augustes assigned augustes and unassigned augustes Mar 21, 2024
Comment thread tutorials/README.md Outdated
# Tutorials for using the `sbi` toolbox

These `sbi` tutorials are aimed at two sepatate groups
1. _users,_ e.g., domain scientists that aim to get an introduction to the method to then apply it to their (mechanistic) models

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move the comma behind the underscore, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will do

Comment thread tutorials/README.md

### Introduction
- [Getting started](00_getting_started_flexible.ipynb) introduces the `sbi` package and its core functionality.
- [Inferring parameters for multiple observations ](01_gaussian_amortized.ipynb)introduces the concept of amortization.

@manuelgloeckler manuelgloeckler Mar 21, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Space missing between link and word

Comment thread tutorials/README.md Outdated
numerical simulations to describe the structure and dynamics of the processes being
investigated.

A key challenge in simulation-based science is constraining these simulation models'

@manuelgloeckler manuelgloeckler Mar 21, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"simulation-based science" is a bit wierd formulation.

Maybe something like "A key challenge of simulation models in science is constraining the (interpretable) parameters of these models with observational data"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good then i will also change this in the docs for the website - this text is from there

@manuelgloeckler manuelgloeckler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I already approved it. I just spotted a few thinks you might wanna fix before merging.

Great, addition to the readme!

@augustes

Copy link
Copy Markdown
Contributor Author

Great, thanks fixed commas, spacing and wording!

@augustes
augustes merged commit 3cf191f into main Mar 21, 2024
@augustes
augustes deleted the 1032-merge-the-first-two-tutorials-and-simplify branch March 21, 2024 14:18
coschroeder pushed a commit that referenced this pull request Mar 22, 2024
* copy previous getting started

* merged linear gaussian 0 and 1

* merged added docs and log prob and new pair plot example

* work in jans comment, restructure next steps

* add tutorial instruction landing page

* added separation users / devs and links to all notebooks

* replace one line example by multi line code example

* fix comma

* fix space, fix simulation-based science wording

---------

Co-authored-by: augustes <[email protected]>
michaeldeistler pushed a commit that referenced this pull request Mar 22, 2024
* restructuring mnle/categorical estimators v0.0

* renaming fixes

* bug fix

* fix circular import error

* renaming theta to context, bug fixes

* 1032 merge the first two tutorials and simplify (#1076)

* copy previous getting started

* merged linear gaussian 0 and 1

* merged added docs and log prob and new pair plot example

* work in jans comment, restructure next steps

* add tutorial instruction landing page

* added separation users / devs and links to all notebooks

* replace one line example by multi line code example

* fix comma

* fix space, fix simulation-based science wording

---------

Co-authored-by: augustes <[email protected]>

* restructuring mnle/categorical estimators v0.0

* renaming fixes

* bug fix

* fix circular import error

* renaming theta to context, bug fixes

* fixed None defaults

* default fixes .2

* default fix .3

---------

Co-authored-by: Guy Moss <[email protected]>
Co-authored-by: augustes <[email protected]>
Co-authored-by: augustes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge the first two tutorials and simplify

2 participants