Skip to content

Commit

Permalink
Speed up base test (#1127)
Browse files Browse the repository at this point in the history
* Replaced zengh with Boehm (smaller model should be faster)

* Added info on the times for each test

* Updated changelog to include it in latest release.

* Corrected date of Changelog
  • Loading branch information
PaulJonasJost authored Oct 19, 2023
1 parent c1f2594 commit f6cf0d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Release notes
..........


0.3.2 (2023-10-02)
0.3.3 (2023-10-19)
-------------------

* Visualize:
Expand All @@ -21,6 +21,8 @@ Release notes
* Ensembles from optimization endpoints now only takes free parameters (#1130)
* General
* Added How to Cite (#1125)
* Additional summary option (#1134)
* Speed up base tests (#1127)


0.3.2 (2023-10-02)
Expand Down
16 changes: 11 additions & 5 deletions test/base/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def _test_basic(engine):
optimizer = pypesto.optimize.ScipyOptimizer(options={'maxiter': 10})
result = pypesto.optimize.minimize(
problem=problem,
n_starts=5,
n_starts=2,
engine=engine,
optimizer=optimizer,
progress_bar=False,
)
assert len(result.optimize_result) == 5
assert len(result.optimize_result) == 2


def test_petab():
Expand All @@ -59,7 +59,9 @@ def test_petab():
def _test_petab(engine):
petab_importer = pypesto.petab.PetabImporter.from_yaml(
os.path.join(
models.MODELS_DIR, "Zheng_PNAS2012", "Zheng_PNAS2012.yaml"
models.MODELS_DIR,
"Boehm_JProteomeRes2014",
"Boehm_JProteomeRes2014.yaml",
)
)
objective = petab_importer.create_objective()
Expand All @@ -79,7 +81,9 @@ def test_deepcopy_objective():
"""Test copying objectives (needed for MultiProcessEngine)."""
petab_importer = pypesto.petab.PetabImporter.from_yaml(
os.path.join(
models.MODELS_DIR, "Zheng_PNAS2012", "Zheng_PNAS2012.yaml"
models.MODELS_DIR,
"Boehm_JProteomeRes2014",
"Boehm_JProteomeRes2014.yaml",
)
)
objective = petab_importer.create_objective()
Expand Down Expand Up @@ -114,7 +118,9 @@ def test_pickle_objective():
"""Test serializing objectives (needed for MultiThreadEngine)."""
petab_importer = pypesto.petab.PetabImporter.from_yaml(
os.path.join(
models.MODELS_DIR, "Zheng_PNAS2012", "Zheng_PNAS2012.yaml"
models.MODELS_DIR,
"Boehm_JProteomeRes2014",
"Boehm_JProteomeRes2014.yaml",
)
)
objective = petab_importer.create_objective()
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ deps =
git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master\#subdirectory=src/python
commands =
pytest --cov=pypesto --cov-report=xml --cov-append \
test/base \
test/profile \
test/sample \
test/visualize \
test/base --durations=0 \
test/profile --durations=0 \
test/sample --durations=0 \
test/visualize --durations=0 \
-s
description =
Test basic functionality
Expand Down

0 comments on commit f6cf0d9

Please sign in to comment.