Skip to content

Commit

Permalink
Release 0.4.1
Browse files Browse the repository at this point in the history
Merge pull request ICB-DCM#1235 from ICB-DCM/develop
  • Loading branch information
PaulJonasJost authored Dec 6, 2023
2 parents d0d2a73 + 98c2739 commit b4a187f
Show file tree
Hide file tree
Showing 53 changed files with 880 additions and 495 deletions.
10 changes: 7 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
# default owners
* @ICB-DCM/pypesto-maintainers

/doc/example/censored.ipynb @Doresic
/doc/example/hdf5_storage.ipynb @PaulJonasJost
/doc/example/hierarchical.ipynb @dilpath @dweindl
/doc/example/julia.ipynb @PaulJonasJost
/doc/example/model_selection.ipynb @dilpath
/doc/example/nonlinear_monotone.ipynb @Doresic
/doc/example/ordinal.ipynb @Doresic
/doc/example/petab_import.ipynb @dweindl @FFroehlich
/doc/example/sampler_study.ipynb @dilpath
/doc/example/sampling_diagnostics.ipynb @dilpath
Expand All @@ -16,8 +19,9 @@
/pypesto/engine/ @PaulJonasJost
/pypesto/engine/mpi_pool.py @PaulJonasJost
/pypesto/ensemble/ @dilpath @PaulJonasJost
/pypesto/hierarchical/ @dweindl @doresic
/pypesto/hierarchical/optimal_scaling_approach/ @doresic
/pypesto/hierarchical/ @dweindl @Doresic
/pypesto/hierarchical/optimal_scaling_approach/ @Doresic
/pypesto/hierarchical/spline_approximation/ @Doresic
/pypesto/history/ @PaulJonasJost
/pypesto/objective/ @PaulJonasJost
/pypesto/objective/amici/ @dweindl @FFroehlich
Expand All @@ -33,7 +37,7 @@
/pypesto/select/ @dilpath
/pypesto/startpoint/ @PaulJonasJost
/pypesto/store/ @PaulJonasJost
/pypesto/visualize/@stephanmg @m-philipps
/pypesto/visualize/ @stephanmg @m-philipps
/test/base/ @PaulJonasJost @m-philipps
/test/doc/ @PaulJonasJost
/test/hierarchical/ @dweindl @doresic
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ jobs:
matrix:
python-version: ['3.9', '3.11']

# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

steps:
- name: Check out repository
uses: actions/checkout@v3
Expand All @@ -180,25 +185,27 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9

- name: Cache
- name: Cache tox and cache
uses: actions/cache@v3
with:
path: |
~/.cache
.tox/
~/.julia/artifacts
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }}

- name: Install julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9

- name: Cache Julia
uses: julia-actions/cache@v1

- name: Install dependencies
run: .github/workflows/install_deps.sh

- name: Install PEtabJL dependencies
run: julia -e 'using Pkg; Pkg.add("PEtab"); Pkg.add("OrdinaryDiffEq"), Pkg.add("Sundials")'
run: julia -e 'using Pkg; Pkg.add("PEtab"); Pkg.add("OrdinaryDiffEq"); Pkg.add("Sundials")'

- name: Run tests
timeout-minutes: 25
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ Release notes
..........


0.4.1 (2023-12-05)
-------------------

* General
* Documentation (#1214, #1227, #1223, #1230, #1229)
* Update code to avoid deprecations and warnings (#1217, #1219)
* Updated codeownership (#1232, #1233)
* Update Citation (#1221)
* Improved Testing (#1218, #1216, #1231)
* History:
* Enable converting MemoryHistory to Hdf5History (#1211)
* Profile:
* Code simplification and other clean up (#1225)
* Fix incorrect indexing in `pypesto.profile.profile_next_guess.get_reg_polynomial` (#1226)
* Optimize
* Warnings for scipy together with laplace prior (#1228)
* Visualization:
* Skip the history trace, if trace is empty. Occurs for infinite initial values. (#1234)
* Ensemble
* Fix Ensemble.from_optimization_endpoints (#1237)


0.4.0 (2023-11-22)
-------------------

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ pyPESTO features include:
* Parameter estimation with ordinal data as described in
[Schmiester et al. (2020)](https://doi.org/10.1007/s00285-020-01522-w) and
[Schmiester et al. (2021)](https://doi.org/10.1093/bioinformatics/btab512).
([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/example_ordinal.ipynb))
* Parameter estimation with censored data. ([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/example_censored.ipynb))
* Parameter estimation with nonlinear-monotone data. ([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/example_nonlinear_monotone.ipynb))
([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/ordinal.ipynb))
* Parameter estimation with censored data. ([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/censored.ipynb))
* Parameter estimation with nonlinear-monotone data. ([example](https://github.com/ICB-DCM/pyPESTO/blob/master/doc/example/nonlinear_monotone.ipynb))

## Quick install

Expand Down Expand Up @@ -59,20 +59,17 @@ We are happy about any contributions. For more information on how to contribute
to pyPESTO check out
<https://pypesto.readthedocs.io/en/latest/contribute.html>

## Publications
## How to Cite

**Citeable DOI for the latest pyPESTO release:**
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2553546.svg)](https://doi.org/10.5281/zenodo.2553546)

There is a list of [publications using pyPESTO](https://pypesto.readthedocs.io/en/latest/references.html).
If you used pyPESTO in your work, we are happy to include
your project, please let us know via a GitHub issue.

When using pyPESTO in your project, please cite
* Schälte, Y., Fröhlich, F., Jost, P. J., Vanhoefer, J., Pathirana, D., Stapor, P.,
Lakrisenko, P., Wang, D., Raimúndez, E., Merkt, S., Schmiester, L., Städter, P.,
Grein, S., Dudkin, E., Doresic, D., Weindl, D., & Hasenauer, J. (2023). pyPESTO: A
modular and scalable tool for parameter estimation for dynamic models [(arXiv:2305.01821)](https://doi.org/10.48550/arXiv.2305.01821).
modular and scalable tool for parameter estimation for dynamic models,
Bioinformatics, 2023, btad711, [doi:10.1093/bioinformatics/btad711](https://doi.org/10.1093/bioinformatics/btad711)

When presenting work that employs pyPESTO, feel free to use one of the icons in
[doc/logo/](https://github.com/ICB-DCM/pyPESTO/tree/main/doc/logo):
Expand All @@ -81,6 +78,10 @@ When presenting work that employs pyPESTO, feel free to use one of the icons in
<img src="https://raw.githubusercontent.com/ICB-DCM/pyPESTO/master/doc/logo/logo.png" height="75" alt="AMICI Logo">
</p>

There is a list of [publications using pyPESTO](https://pypesto.readthedocs.io/en/latest/references.html).
If you used pyPESTO in your work, we are happy to include
your project, please let us know via a GitHub issue.

## References

pyPESTO supersedes [**PESTO**](https://github.com/ICB-DCM/PESTO/) a parameter estimation
Expand Down
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
'autodoc_inherit_docstrings': True,
}
autodoc_mock_imports = ["amici"]
autodoc_class_signature = "separated"

# napoleon options
napoleon_use_rtype = False

# links for intersphinx
intersphinx_mapping = {
Expand All @@ -90,7 +94,7 @@
typehints_document_rtype = True
autodoc_typehints = "description"

bibtex_bibfiles = ["using_pypesto.bib"]
bibtex_bibfiles = ["using_pypesto.bib", "references.bib"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
6 changes: 3 additions & 3 deletions doc/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Algorithms and features
example/model_selection.ipynb
example/julia.ipynb
example/hierarchical.ipynb
example/example_ordinal.ipynb
example/example_censored.ipynb
example/example_nonlinear_monotone.ipynb
example/ordinal.ipynb
example/censored.ipynb
example/nonlinear_monotone.ipynb

Application examples
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
"For censored measurements, the `measurement` column will be ignored. For the `Ybar` observable we didn't specify a measurement type, so those will be used as quantitative.\n",
"\n",
"#### Note on inclusion of additional data types:\n",
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [nonlinear-monotone data](example_nonlinear_monotone.ipynb) and [ordinal data](example_ordinal.ipynb) for details on integration of other data types. Additionally, as shown in this example, if the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [nonlinear-monotone data](nonlinear_monotone.ipynb) and [ordinal data](ordinal.ipynb) for details on integration of other data types. Additionally, as shown in this example, if the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
"metadata": {},
"source": [
"#### Note on inclusion of additional data types:\n",
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [ordinal data](example_ordinal.ipynb) and [censored data](example_censored.ipynb) for details on integration of other data types. If the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [ordinal data](ordinal.ipynb) and [censored data](censored.ipynb) for details on integration of other data types. If the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
"Measurements with a larger category number will be constrained to be higher in the ordering. Multiple measurements can be assigned to the same category. If this is done, these measurements will be treated as indistinguishable. \n",
"\n",
"#### Note on inclusion of additional data types:\n",
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [nonlinear-monotone data](example_nonlinear_monotone.ipynb) and [censored data](example_censored.ipynb) for details on integration of other data types. If the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
"It is possible to include observables with different types of data to the same `petab_problem`. Refer to the notebooks on using [nonlinear-monotone data](nonlinear_monotone.ipynb) and [censored data](censored.ipynb) for details on integration of other data types. If the `measurementType` column is left empty for all measurements of an observable, the observable will be treated as quantitative."
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions doc/how_to_cite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ How to cite pyPESTO
:target: https://doi.org/10.5281/zenodo.2553546
:alt: pyPESTO release DOI


There is a list of `publications using pyPESTO <https://pypesto.readthedocs.io/en/latest/references.html>`_.
If you used pyPESTO in your work, we are happy to include
your project, please let us know via a GitHub issue.

When using pyPESTO in your project, please cite

- Schälte, Y., Fröhlich, F., Jost, P. J., Vanhoefer, J., Pathirana, D., Stapor, P.,
Lakrisenko, P., Wang, D., Raimúndez, E., Merkt, S., Schmiester, L., Städter, P.,
Grein, S., Dudkin, E., Doresic, D., Weindl, D., & Hasenauer, J. (2023). pyPESTO: A
modular and scalable tool for parameter estimation for dynamic models `arXiv:2305.01821 <https://doi.org/10.48550/arXiv.2305.01821>`_.
modular and scalable tool for parameter estimation for dynamic models,
Bioinformatics, 2023;, btad711, https://doi.org/10.1093/bioinformatics/btad711

When presenting work that employs pyPESTO, feel free to use one of the icons in
`doc/logo/ <https://github.com/ICB-DCM/pyPESTO/tree/main/doc/logo>`_:
Expand All @@ -26,3 +22,7 @@ When presenting work that employs pyPESTO, feel free to use one of the icons in
:target: https://raw.githubusercontent.com/ICB-DCM/pyPESTO/master/doc/logo/logo.png
:height: 75
:alt: pyPESTO LOGO

There is a list of `publications using pyPESTO <https://pypesto.readthedocs.io/en/latest/references.html>`_.
If you used pyPESTO in your work, we are happy to include
your project, please let us know via a GitHub issue.
67 changes: 67 additions & 0 deletions doc/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

@Article{EgeaBal2009,
author = {Egea, Jose A. and Balsa-Canto, Eva and García, María-Sonia G. and Banga, Julio R.},
journal = {Industrial & Engineering Chemistry Research},
title = {Dynamic Optimization of Nonlinear Processes with an Enhanced Scatter Search Method},
year = {2009},
issn = {1520-5045},
month = apr,
number = {9},
pages = {4388--4401},
volume = {48},
creationdate = {2023-11-21T15:56:38},
doi = {10.1021/ie801717t},
modificationdate = {2023-11-21T16:27:59},
publisher = {American Chemical Society (ACS)},
}

@Article{EgeaMar2010,
author = {Jose A. Egea and Rafael Martí and Julio R. Banga},
journal = {Computers & Operations Research},
title = {An evolutionary method for complex-process optimization},
year = {2010},
issn = {0305-0548},
number = {2},
pages = {315-324},
volume = {37},
abstract = {In this paper we present a new evolutionary method for complex-process optimization. It is partially based on the principles of the scatter search methodology, but it makes use of innovative strategies to be more effective in the context of complex-process optimization using a small number of tuning parameters. In particular, we introduce a new combination method based on path relinking, which considers a broader area around the population members than previous combination methods. We also use a population-update method which improves the balance between intensification and diversification. New strategies to intensify the search and to escape from suboptimal solutions are also presented. The application of the proposed evolutionary algorithm to different sets of both state-of-the-art continuous global optimization and complex-process optimization problems reveals that it is robust and efficient for the type of problems intended to solve, outperforming the results obtained with other methods found in the literature.},
creationdate = {2023-11-21T15:57:20},
doi = {10.1016/j.cor.2009.05.003},
keywords = {Evolutionary algorithms, Complex-process optimization, Continuous optimization, Global optimization, Metaheuristics},
modificationdate = {2023-11-21T15:57:20},
url = {https://www.sciencedirect.com/science/article/pii/S0305054809001440},
}


@Article{VillaverdeEge2012,
author = {Villaverde, Alejandro F and Egea, Jose A and Banga, Julio R},
journal = {BMC Systems Biology},
title = {A cooperative strategy for parameter estimation in large scale systems biology models},
year = {2012},
issn = {1752-0509},
month = jun,
number = {1},
volume = {6},
creationdate = {2023-11-21T15:57:46},
doi = {10.1186/1752-0509-6-75},
modificationdate = {2023-11-21T15:57:46},
publisher = {Springer Science and Business Media LLC},
}


@Article{PenasGon2017,
author = {Penas, David R. and González, Patricia and Egea, Jose A. and Doallo, Ramón and Banga, Julio R.},
journal = {BMC Bioinformatics},
title = {Parameter estimation in large-scale systems biology models: a parallel and self-adaptive cooperative strategy},
year = {2017},
issn = {1471-2105},
month = jan,
number = {1},
volume = {18},
creationdate = {2023-11-21T15:57:58},
doi = {10.1186/s12859-016-1452-4},
modificationdate = {2023-11-21T15:57:58},
publisher = {Springer Science and Business Media LLC},
}

@Comment{jabref-meta: databaseType:bibtex;}
8 changes: 4 additions & 4 deletions pypesto/engine/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Abstract engine base class."""
import abc
from typing import Any, List
from typing import Any

from .task import Task

Expand All @@ -13,15 +13,15 @@ def __init__(self):

@abc.abstractmethod
def execute(
self, tasks: List[Task], progress_bar: bool = True
) -> List[Any]:
self, tasks: list[Task], progress_bar: bool = True
) -> list[Any]:
"""Execute tasks.
Parameters
----------
tasks:
List of tasks to execute.
progress_bar:
Whether to display a progress bar.
Whether to display a progress bar. Defaults to ``True``.
"""
raise NotImplementedError("This engine is not intended to be called.")
14 changes: 9 additions & 5 deletions pypesto/engine/mpi_pool.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Engines with multi-node parallelization."""
import logging
from typing import Any, List
from typing import Any

import cloudpickle as pickle
from mpi4py import MPI
Expand Down Expand Up @@ -32,17 +32,21 @@ def __init__(self):
super().__init__()

def execute(
self, tasks: List[Task], progress_bar: bool = True
) -> List[Any]:
self, tasks: list[Task], progress_bar: bool = True
) -> list[Any]:
"""
Pickle tasks and distribute work to workers.
Parameters
----------
tasks:
List of tasks to execute.
List of :class:`pypesto.engine.Task` to execute.
progress_bar:
Whether to display a progress bar.
Whether to display a progress bar. Defaults to ``True``.
Returns
-------
A list of results.
"""
pickled_tasks = [pickle.dumps(task) for task in tasks]

Expand Down
Loading

0 comments on commit b4a187f

Please sign in to comment.