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

Release v0.5.4 #1468

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft

Release v0.5.4 #1468

wants to merge 35 commits into from

Conversation

PaulJonasJost
Copy link
Collaborator

@PaulJonasJost PaulJonasJost commented Sep 17, 2024

dependabot bot and others added 16 commits August 1, 2024 09:58
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 1 to 2.
- [Release notes](https://github.com/julia-actions/cache/releases)
- [Changelog](https://github.com/julia-actions/cache/blob/main/devdocs/making_a_new_release.md)
- [Commits](julia-actions/cache@v1...v2)

---
updated-dependencies:
- dependency-name: julia-actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Changelog](https://github.com/julia-actions/setup-julia/blob/master/devdocs/making_a_new_release.md)
- [Commits](julia-actions/setup-julia@v1...v2)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…zation (#1435)

* Implement hierarchical log scale for visualization

* Add scaling info in parameter description

* Fix test, had wrong inner par scale in test problem

* review changes, scale in x axis, log noise parameters

* Change docstring slightly
* Aesara with numpy 2.0 thre ImportError

* Removed aesara from the documentation for now
* Fixed an issue when the objective passed to finite differences was not fixed value free

* corrected usage in tests

* Fixed tests in hierarchical
* Update references

* LakrisenkoPat2024

* Add SchmiesterBra2024

* JacksonCha2023 #1450

...
* adding utilities to compute Bayes Factor

* adding tutorial on Bayes Factors
Fix list formatting in doc/example/model_evidence_and_bayes_factors.ipynb,
get rid of ipywidgets warning, and fix typo.
…1457)

There seems to be a difference in the acceptance threshold for objective improvement that is reported in the sacess paper and the value that is used in the implementation. Changing to the value used in the original implementation.

For the manager:
[Paper](https://doi.org/10.1186/s12859-016-1452-4): 10%
Implementation accompanying the paper: [0.5%](https://bitbucket.org/DavidPenas/sacess-library/src/18b2027af5b97158e5d5303487455e5e529bcf5a/src/method_module_fortran/eSS/parallelscattersearchfunctions.f90#lines-388) 
More [recent](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011151) implementation: [0.01%](https://bitbucket.org/DavidPenas/sacess-library/src/508e7ac15579104731cf1f8c3969960c6e72b872/src/method_module_fortran/eSS/parallelscattersearchfunctions.f90#lines-396)
Also added a check for the minimum acceptance threshold as in the original implementation. 

For the workers: 
should be 0.01% instead 0.01.
* Introduces a new SacessOptions class to collect SacessOptimizer hyperparameters and makes some previously hard-coded values configurable.

  Closes #1458

* Fixes a mismatch in adaptation conditions between the original SaCeSS implementation and SacessOptimizer (adaptation condition: AND -> OR)

* Log final worker configuration

* Sort refset before resizing.
…ty check (#1462)

Previously, the distance was scaled to the second point, which didn't make too much sense.
Now it's scaled to the parameter bounds.
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 85.72985% with 131 lines in your changes missing coverage. Please review.

Project coverage is 82.74%. Comparing base (ead29b3) to head (47ae5d5).

Files with missing lines Patch % Lines
pypesto/petab/objective_creator.py 88.88% 29 Missing ⚠️
pypesto/profile/walk_along_profile.py 48.93% 24 Missing ⚠️
pypesto/petab/importer.py 69.23% 12 Missing ⚠️
pypesto/sample/evidence.py 92.80% 10 Missing ⚠️
pypesto/visualize/profiles.py 74.35% 10 Missing ⚠️
pypesto/optimize/ess/sacess.py 80.55% 7 Missing ⚠️
pypesto/hierarchical/base_problem.py 71.42% 6 Missing ⚠️
pypesto/profile/profile_next_guess.py 87.23% 6 Missing ⚠️
pypesto/objective/julia/petabJl.py 50.00% 4 Missing ⚠️
pypesto/objective/petab.py 90.47% 4 Missing ⚠️
... and 10 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
- Coverage   83.27%   82.74%   -0.53%     
==========================================
  Files         161      163       +2     
  Lines       13396    13892     +496     
==========================================
+ Hits        11155    11495     +340     
- Misses       2241     2397     +156     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

PaulJonasJost and others added 13 commits September 23, 2024 18:03
* Moved creation of the amici objective function to a separate class, leaving the importer really independent of amici

* Remove check gradients, as this can be done in an objective function

* Added functions with a not implementedError and moved most of them to AmiciFactory

* Moved import to a factory, allowing a single PEtabImporter to function with different models. Created a basic PetabSimulator supported (inefficent most likely but as a starter)

* Resolve potential annotation problems.

* Solved the problem of x_names not saving the fixd parameters. similar solution to amici Objective

* rewrote petab testsuite to fit new design.

* Adjusted text and example code for new changes

* import error with petab simulator

* updated code

* import petab as optional

* Adjusted roadrunner example and also solved issue in PetabImporterRR

* Another import

* Another import and spline error

* Changed the documentation that is included

* added test for petabSimulator with the example of basico

* Fix text for check gradients and fix roadrunner notebook.

* added test for petabSimulator with the example of basico

* cleared output

* Hopeflly renamed everything

* Temporary fix for roadrunner fd objective

* correct installation of basico as petab simulator in test

* Removed try-except in simulator as it is to unspecific. Now requiring the parameter update function

* not basico but copasi-basico

* not copasi-basico but copasi-basico[petab]

* Adjusted some description text

* More accurate documentation

* Replaced Usage of roadrunner, amici, petab strings with constants

* Update doc/example/petab_import.ipynb

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>

* Update doc/example/petab_import.ipynb

Co-authored-by: Fabian Fröhlich <fabian.frohlich@crick.ac.uk>

* Renamed factory mentions as it was not a fitting name.

* added option to pass simulator type and simulator to create_objective_creator

---------

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Fabian Fröhlich <fabian.frohlich@crick.ac.uk>
* Updated features. Replaced example links from github to readthedocs.

* Updated Samplng feature.

* Added paper figure to docs and feature

* replaced pdf with png

* Apply suggestions from code review

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>

* Highlighted keywords

* Apply suggestions from code review

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Co-authored-by: Doresic <85789271+Doresic@users.noreply.github.com>

* Update README.md

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>

---------

Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Co-authored-by: Doresic <85789271+Doresic@users.noreply.github.com>
* change test_bridge_sampling to laplace

* increase flaky

---------

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>
Cloudpickle is able to handle more complex objects than pickle.

See #1465
Closes #1465
* Added HPD calculation to ensemble

The ensemble from_sample method has now an additional rel_cutoff argument. rel_cutoff allwos to cut the posterior to the alpha % highest density (here non-normalized posterior probability).

* Update ensemble.py

fixes print statement that was only used for debugging

* Update pypesto/ensemble/ensemble.py

Adds default value for burn_in

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>

* Update pypesto/ensemble/ensemble.py

Fixes wrong default value for the ci_level

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>

* added test for the hpd calculation and renamed rel_cutoff

* Forgot name change in test

* Integrated comments

---------

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>
Co-authored-by: PaulJonasJost <jost.pauljonas@gmail.com>
This wasn't updated in a while ...
This fixes a bug in the recombination step of the `ESSOptimizer`, also used by `SacessOptimizer`.

This will in particular improve performance when using scatter search without local optimizers.
Fixes some issues related to copies vs views, that stopped the go-beyond search prematurely.
Convert path-li_StrPathke object to str. Changed in sphinx>=8.

Fixes #1482.
Trigger CI workflow on `merge_group` event.

Required for #1478. 

Closes #1478.
* shortening many optimizations. Replacing Boehm with conversion reaction where possible. Thermodynamic more robust.

* Correctly install pyswarms in notebooks1

* renamed "model_conversion_reaction" to "conversion_reaction" according to naming scheme in benchmark models as well

* Revert "renamed "model_conversion_reaction" to "conversion_reaction" according to naming scheme in benchmark models as well"

This reverts commit a1a54f7.

* reverted changes and kept original structure. adjusted amici.ipynb

* changed directory

* changed directory II

* Start out with boehm, for optimization etc change to conversion reaction

* fixed custom_objective_function

* for now: more starts with pyswarms.

* changed julia notebooks ever so slightly.

* Revert changes to julia notebook

* Integrate comments

* Correct PEtab logo now.

* Update doc/example/getting_started.ipynb

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>

* Update doc/example/getting_started.ipynb

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>

* Adjusted amici logo

* Removed pyswarms from waterfall visualization

* Fixed a random seed for sampling notebook

---------

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
* Changes to codeowners discussed at retreat

* Removed codeowner of visualization
dweindl and others added 6 commits October 17, 2024 14:47
* Make SacessOptimizer conform more to the original saCeSS - default settings were shifted by one worker.

* More informative debugging output 

* Add `RefSet.__repr__`

* Test with `SacessOptions`

* Fix x trace in history (`history.update` does not copy x by itself); fval trace was correct
Branch was merged to master and deleted.

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>
* Moved dyntesty mcmc test into pipeline

* Merged two very similar tests

* Remove unused sample result

* Sized down sample size to a fifth (still getting through in 80% of test) and marked as flakey.

* Moved harmonic mean to other evidence calculations

* Added util file for problem definition and constants

* Fixed Small typo and limited the number of chains for pymc

* Removed "test_groundtruth_separated_modes", as it is not really a test as for of an exhibition, which is covered in the jupyter notebook "sampler_study"

* Adapted import in variational to new changes

* Fixed error in multi_startpoint tests due to increased number of chains
* Initial working update

Implement two targets: higher and lower. Choose which one to go to depending on first guess.
Different calculation of next_obj_target

TODO: change 1.5 to magic factor

* Add TODOs

* Introduce adaptive max and min steps

Implemented adaptive max and min steps in profiling. If the optimization during profiling fails (results in inf value), the algorithm will first try to iteratively decrease `max_step_size` to be closer to the last point that had a successful optimization. If that doesn't work (if we reduce max_step_size below min_step_size), then max_step_size is set back to the default and we try to increase min_step_size to "jump over" the problematic area.

Resampling random points and start from those is only the last resort and will be done if these two do not work. The idea is that we want to stay as close as we can to the last profiling point.

TODO: Put the adaptive reduction/increase of max_step_size/min_step_size into options

* Fix flags for exiting the "trust area"

* Bugfixes, Robustness, Logging, Better plotting

- BUGFIX: absolute value in objective targets at last_delta_fval
- BUGFIX: extrapolation explosions if we start at boundary
- Feature: Trust region on extrapolation
- Added y ticks back into the plot, sometimes the range is completely different.
- Added points to the plotting of profiles (in case of one result and one profile list id)
- Added color change to plotting of profiles (in case of one result and one profile list id)
- LOGGING: added logging.INFO with informations of steps made and successful optimizations.

* Fix default value for color_path

* Fix color value issues -- failing tests

* Add tuple to isinstance list

* No color_path plotting if color requested

* Fix if statements fixed_method

* We're making more steps then before

Test were testing whether the profiling method was making a lot of steps. Now we're making a lot more steps due to higher robustness.

* Change default magic and max values

* Change default method, remove TODOs

* Update quality colors

* Fix failing test

* Fix test and docstring

* Rewrite some too long if statements

* Some more if statements cleanup

* Change color if no

* Correct y-axis in obj.fun plotting

* Paul review changes

* More Paul review changes

* Fix if-while infinite loop bug

* Correct comment variable name

Co-authored-by: Maren Philipps <55318391+m-philipps@users.noreply.github.com>

* Change i_color to color_i

* Change docstring of color in lowlevel

* Expand colors docstring

* Fix color format checking and update docstring

---------

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>
Co-authored-by: Maren Philipps <55318391+m-philipps@users.noreply.github.com>
* Updated Julia version and PEtab.jl version to latest non breaking version

* Updated strings and functions. Changed to version 3.x. Slightly adjusted tolerances in a test

* removed specified version from petab.jl

* remove caching as a test
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.

7 participants