Skip to content

Conversation

@PaulJonasJost
Copy link
Collaborator

No description provided.

Doresic and others added 17 commits November 14, 2025 16:28
* Fix ensemble dataset creation and dataset analysis

- The function `get_prediction_dataset` can either receive the Ensemble object from which a `EnsemblePrediction` is extracted or an `EnsemblePrediction` object. However, if the former is passed, the dataset was not correctly extracted from its `EnsemblePrediction`, but rather just the `EnsemblePrediction` would be passed back. So I just added the extraction of the dataset in that case.
- The dataset created with the `get_prediction_dataset` function would result in a three dimensional array across samples, timepoints and observables. However, the functions in `covariance_analysis.py` and `dimension_reduction.py` like the covariance matrix, PCA and UMAP, need a two dimensional array of samples x features. So I added a collapsing of the arrays when the function is called.
- When the method `predict` of an `Ensemble` is called to generate a prediction, the prediction is not saved inside the `Ensemble.predictions` attribute. This seems a bit unusual, why would there be a `predictions` attribute if it doesn't get populated with predictions that are made using the ensemble. So I just added the appending of predictions.

* Change default plotting to white background

- Changed the default background color for `ensemble_scatter_lowlevel` to white instead of black for better visibility
- Removed lower_bound and upper_bound from EnsemblePrediction, they were never really completely implemented

* Add dim.red. & cov. + visualization tests

* Change docstring to parameter ensemble

* Fix tests

* try debug pre-commit

* another debug

* fix quality test

* debug quality

* Remove show-diff-on-failure from pre-commit run

* move import of petab.v1

* Fix typo in docstring for prediction extraction
* Updated history loading.
1. LazyResult now set as default
2. Enable accessing values in LazyOptimizerResult as dict
3. Added option to ignore history, useful when loading not lazy but history is not needed

* Keeping lazy = False as standard

* integrated suggestions

* Update pypesto/result/optimize.py

Co-authored-by: Daniel Weindl <[email protected]>

---------

Co-authored-by: Daniel Weindl <[email protected]>
…rs (#1638)

* Added a unified interface for setting time limits across all optimizers in pyPESTO. Previously, each optimizer had its own way of handling time limits (e.g., `max_wall_time` for Ipopt, `timeout` for CMA, `MAXTIME` for Fides), making it difficult to configure optimizers uniformly, especially in contexts like SacessOptimizer.

This fix introduces two new methods to the base `Optimizer` class:
- `supports_maxtime() -> bool`: Check if optimizer supports time limits
- `set_maxtime(seconds: float) -> None`: Set the maximum wall time

These methods are implemented for all optimizers that support time limits:
- IpoptOptimizer (if Ipopt >= 3.14.0)
- CmaOptimizer
- NLoptOptimizer
- FidesOptimizer
- ESSOptimizer

The unified interface makes it easy to:
1. Check capability before setting time limits
2. Set time limits consistently across different optimizers

* Removed CMA test, as it does not have timeout

* Merge two tests
* Reintroduce pymc to documentation

* fix pymc dependencies

* fix pymc dependencies

* lazy import

* lazy import with create_instance intact

* added link to pymc

---------

Co-authored-by: arrjon <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixes two bugs affecting `ESSOptimizer` and `SacessOptimizer`:

* The ranking of candidates for local optimization startpoints was wrong in many cases. Only relevant if a local optimizer was used.
* In some cases, objective evaluations were counted twice. Resulting in incorrect reporting of the total number of evaluations and not fully exhausting the objective evaluations budget.
Making the string a pure string led to the offset not being displayed properly in the waterfall plots
* CMA verbosity per default at minimum (ignores signals filename). Closes #1649

* tests non verbosity of CMA optimizer.

* Simplified test
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4...v5)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Refactored x0 passing to history and made x0 optional. #TODO: Check that switching x0 and id is fine

* Some usages of minimize.

* Reverted Positional change of x0 and id.

Inserted Id check at history

Changed check_x0_support such that per default it assumes x0 is necessary.

* Slight typehinting improvement

* Corrected call in tasks and in test of check_x0_support.
* Added description of top 10 longest tests to CI and (for now) increased test time to 45 min. This will be changed down, if any bottleneck can be identified!

* Only run critical tests (as in windows)

* Testwise: macos-14 but full tests

* reverted to 30mins and macos 14
* Lines 254-256 already clarify, that we might face roundoff errors. Thus making this test flaky is a valid argument and should Close #1662

* testwise old version of mac as tests seem to start failing every since that PR

* Update .github/workflows/ci.yml
* sampling from prior as start

* sampling from prior as start

* add logger

* add logger

* better initial starting sampling

* radnom seed

* fix PetabStartpoints

* fix notebook

* update docstring

* fix startpoint bug

* add warm start for PT

* return nan if no prior given

* warm start PT

* warm start PT

* return samples as dict

* fix prior test

* Update pypesto/problem/base.py

Co-authored-by: Paul Jonas Jost <[email protected]>

* update notebook

* Update pypesto/objective/priors.py

Co-authored-by: Dilan Pathirana <[email protected]>

* Update pypesto/objective/priors.py

Co-authored-by: Dilan Pathirana <[email protected]>

* Update pypesto/objective/priors.py

Co-authored-by: Dilan Pathirana <[email protected]>

* Update pypesto/startpoint/prior.py

Co-authored-by: Dilan Pathirana <[email protected]>

* Update pypesto/startpoint/prior.py

Co-authored-by: Dilan Pathirana <[email protected]>

* improved comments

* improved comments

* Combine _resample_out_of_bounds and sample

* improve comments

* fix scale in sampling

* improved test

* Apply suggestions from code review

Co-authored-by: Dilan Pathirana <[email protected]>

* better type hints

* improve comments

* improve kwargs

* fix test

* Update pypesto/startpoint/prior.py

Co-authored-by: Daniel Weindl <[email protected]>

* Update pypesto/objective/priors.py

Co-authored-by: Daniel Weindl <[email protected]>

* Update pypesto/objective/priors.py

Co-authored-by: Daniel Weindl <[email protected]>

* fix type hint

* fix type hint

---------

Co-authored-by: Paul Jonas Jost <[email protected]>
Co-authored-by: Dilan Pathirana <[email protected]>
Co-authored-by: Daniel Weindl <[email protected]>
* Make DlibOptimizer solver_epsilon configurable

Change the hardcoded solver_epsilon value (0.002) to a configurable
option with a default of 0.0 (dlib's original default). Users can
now customize this parameter via the options dictionary.

Fixes #1492

* improved initialization of Dlib options

* calling function correctly

* privatising function

* sanity check
@codecov-commenter
Copy link

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

Codecov Report

❌ Patch coverage is 84.92308% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.37%. Comparing base (8e03762) to head (bc7d89a).

Files with missing lines Patch % Lines
pypesto/optimize/optimizer.py 83.33% 20 Missing ⚠️
pypesto/sample/sample.py 47.05% 9 Missing ⚠️
pypesto/objective/priors.py 86.66% 4 Missing ⚠️
pypesto/startpoint/prior.py 90.00% 4 Missing ⚠️
pypesto/ensemble/util.py 25.00% 3 Missing ⚠️
pypesto/sample/pymc.py 88.46% 3 Missing ⚠️
pypesto/ensemble/ensemble.py 71.42% 2 Missing ⚠️
pypesto/result/optimize.py 88.88% 2 Missing ⚠️
pypesto/sample/parallel_tempering.py 77.77% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1667      +/-   ##
==========================================
+ Coverage   83.72%   84.37%   +0.64%     
==========================================
  Files         163      164       +1     
  Lines       14088    14320     +232     
==========================================
+ Hits        11795    12082     +287     
+ Misses       2293     2238      -55     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

6 participants