Skip to content
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

Goose-based Initialization strategies #72

Merged
merged 22 commits into from
Sep 14, 2023
Merged

Goose-based Initialization strategies #72

merged 22 commits into from
Sep 14, 2023

Conversation

GianmarcoCallegher
Copy link
Contributor

No description provided.

@GianmarcoCallegher GianmarcoCallegher self-assigned this Jul 12, 2023
@GianmarcoCallegher GianmarcoCallegher added comp:goose This issue is related to the goose module enhancement New feature or request labels Jul 12, 2023
@GianmarcoCallegher
Copy link
Contributor Author

@hriebl I don't know if I should use Option for _initi_startegies. If so, at some point I should get the value of the object. This can be done using the property value of the class. This works for some tests but for others I get the following error: AttributeError: 'dict' object has no attribute 'value'

Copy link
Contributor

@hriebl hriebl left a comment

Choose a reason for hiding this comment

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

Thank you for your work! I've added a few first comments. One more thought: Maybe we should not call the attribute self._init_strategies but self._jitter_fns, etc. I know I came up with the original name, but self._jitter_fns seems shorter and more descriptive.

liesel/goose/builder.py Outdated Show resolved Hide resolved
liesel/goose/builder.py Outdated Show resolved Hide resolved
liesel/goose/builder.py Outdated Show resolved Hide resolved
liesel/goose/builder.py Outdated Show resolved Hide resolved
@GianmarcoCallegher
Copy link
Contributor Author

Ready for the second check. There are 2 warnings generated by some incompatible type with the new version of jax. See #73

Copy link
Contributor

@hriebl hriebl left a comment

Choose a reason for hiding this comment

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

Thank you for the update! I've fixed a typo and a few minor things, plus there are two more comments below.

liesel/goose/builder.py Outdated Show resolved Hide resolved
liesel/goose/builder.py Outdated Show resolved Hide resolved
@hriebl
Copy link
Contributor

hriebl commented Aug 29, 2023

Is this ready for another round of review, @GianmarcoCallegher?

@GianmarcoCallegher
Copy link
Contributor Author

Is this ready for another round of review, @GianmarcoCallegher?

Yes

@hriebl hriebl self-requested a review September 1, 2023 12:56
Copy link
Contributor

@hriebl hriebl left a comment

Choose a reason for hiding this comment

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

Thank you for providing the additional tests, @GianmarcoCallegher! This is now ready to be merged.

@hriebl hriebl merged commit ddb6d15 into main Sep 14, 2023
3 checks passed
@hriebl hriebl deleted the init_strategy branch September 14, 2023 12:36
GianmarcoCallegher added a commit that referenced this pull request Feb 9, 2024
* correct sampling for sigma_sq

* try to update calc on init

Update nodes.py

* fix test

Due to the exception being caught and re-raised in the update() method, we do not get the actual error text here.

* Add Goose-based initialization strategies / jittering (#72)

Co-authored-by: Hannes Riebl <[email protected]>

* Cap BlackJAX version (#95)

* Fix PyMC tutorial (#96)

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

* Fix mypy errors (#97)

* Improve import name

* Fix title in plot_scatter(), closes #98

* Adapt to BlackJAX 1.0.0 (#100)

Co-authored-by: Hannes Riebl <[email protected]>

* increase timeout

* Update metadata v0.2.5

* update metadata 0.2.6-dev

* Fix Mypy errors (#102)

Co-authored-by: Gianmarco Callegher <[email protected]>

* More Efficient MVN Degenerate (#101)

* Efficient MVN Degenerate

* Fixed blackjax refactor error

* Refactor

* indent more code

* Update CHANGELOG.md

---------

Co-authored-by: Gianmarco Callegher <[email protected]>
Co-authored-by: Johannes Brachem <[email protected]>

* Fix #103 (#109)

* Update summary_m.py

* Update CHANGELOG.md

* Update deprecation message

* update deprecation messages

* Rename Param and Obs (#130)

* change names

* update usage in tests

* update usage in README

* Update CHANGELOG.md

* Make error_df public (closes #94) (#137)

* Update summary_m.py

* Update CHANGELOG.md

* Fix comparing samplers tutorial (closes #107) (#134)

* adapt to lower/case obs and param

* include rank and log?pdet in graph

* split single NUTS kernel up

* Fix group tutorial (closes #131) (#135)

* adapt to lower/case obs and param

* include rank and log?pdet in graph

* fix wrong variable names

* Update 07-groups.qmd

---------

Co-authored-by: Gianmarco Callegher <[email protected]>

* Expose sampling results (#138)

* export SamplingResults

* Update CHANGELOG.md

* Refactor goose-models to goose-interfaces (closes #110) (#136)

* Rename goose "models" to "interfaces"

* add warnings

* rename and move GooseModel -> LieselInterface

* update names in other parts of the code

* Update CHANGELOG.md

* restore goose.models module

* call super

* MVN Degenerate from smoothing param (#133)

* MVN Degenerate from smoothing param

* Added log prob test

* Fix pre commit error

* Refactor. Back to old naming

---------

Co-authored-by: Gianmarco Callegher <[email protected]>

* update revision of hooks in pre-commit-config (#139)

* fix typo

* update lsl.Node docs

* update Data docs

* update calc docs

* update dist docs

* update var docs

* Update config to avoid seaborn warnings

* Revert "Update config to avoid seaborn warnings"

This reverts commit 0bed211.

* update obs and param docs

* fix deprecation message of add_groups

* activate docs builds for PRs

* Update config to avoid seaborn warnings (#141)

Co-authored-by: Gianmarco Callegher <[email protected]>

* update graphbuilder docs

* update model docs

* update enginebuilder docs

* update interface docs

* Update README.md

* Add model and goose overview (#145)

* add overview pages to docs

* Update goose.rst

* Update index.rst

* Update nodes.py

* fix typo

* Jittering Functions documentation (#144)

* Jittering functions documentation

* Simpler example

* Simpler example

* Simpler example

* Removed set_duration and build

* Back to param

* Pre-commit happy

* Updated doc if jitter functions are not provided

---------

Co-authored-by: Gianmarco Callegher <[email protected]>

* Make GEV tutorials to work (#140)

* Make GEV tutorial to work

* Updated tutorial and jitter fn for tau2

* truncated_normal fixed for pytest

---------

Co-authored-by: Gianmarco Callegher <[email protected]>

* update linear regression tutorial

* Update 01a-transform.qmd

* Update 02-ls-reg.qmd

* remove mistakenly added lines

* add pointer to tutorials

update link

* update deprecation warning message

* Update docs.yml

* Fix some pytets warnings (#147)

* Fix some pytets warnings

* Update test_goose.py

---------

Co-authored-by: Gianmarco Callegher <[email protected]>
Co-authored-by: Johannes Brachem <[email protected]>

* Update CHANGELOG.md

* Update __version__.py

* Update __version__.py

* Different seed GEV tutorials

* Allow passing key as seed

* add

* change type to be consistent with Goose

* pin pymc version

* Implements NamedTupleInterface (#151)

* Adds NamedTupleInterface

* Format

* Add documentation

* Export NamedTupleInterface in goose.__init__.py

* Format

* Update documentation

* Update CHANGELOG.md

* Updated version

* Update CHANGELOG.md

* fix name `basis_matrix` in 07-groups.qmd (#166)

* Better data generation for location-scale regression tutorial

* Fixed deprecated warnings

* Update docs (#169)

* Update model.rst

* Update __version__.py

* Raise error if duplicate nodes are detected in GraphBuilder.transform (#167)

* Transform method handles nodes duplicates

* Refactor

* Added tests. Removed useless check

* Update CHANGELOG.md

* rename and move test

* rephrase message

* remove unnecessary code

---------

Co-authored-by: Gianmarco Callegher <[email protected]>
Co-authored-by: Johannes Brachem <[email protected]>

* try to update calc on init

Update nodes.py

* fix test

Due to the exception being caught and re-raised in the update() method, we do not get the actual error text here.

* implement init argument

* fix Calc docs

* Update CHANGELOG.md

* Removed duplicated logger in nodes module

---------

Co-authored-by: Hannes Riebl <[email protected]>
Co-authored-by: Gianmarco Callegher <[email protected]>
Co-authored-by: wiep <[email protected]>
Co-authored-by: Gianmarco Callegher <[email protected]>
Co-authored-by: Sebastian Lorek <[email protected]>
Co-authored-by: Sebastian Lorek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:goose This issue is related to the goose module enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants