Skip to content

0.22.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Nov 11:58
· 1 commit to develop since this release
8682e5b

Release notes for sbmlsim 0.22.0

sbmlsim

A single least squares optimization now uses every core: the points of the finite differences of its jacobian are evaluated on the workers of the fit, which is the whole cost of a fit of many parameters. A fit of one start on twelve cores ran in 390 s instead of 6124 s on the machine perfusion model of pkdb_models (35 parameters, 498 residuals, 45 fit mappings), and a multistart of six starts in 35 minutes instead of an estimated 10 hours.

Results which change: none. The points of a jacobian are evaluated at the same step whether they run in the calling process or on workers, so the jacobian of a fit on workers is the jacobian of a serial fit bitwise, and a fit of a seed takes the same path and reaches the same optimum on any number of cores.

Features

  • A least squares run evaluates its jacobian on the workers of the fit (#505). split_cores of sbmlsim.fit.runner gives the workers either to the runs of a fit or to the evaluations of a single run, which until now meant the population of differential evolution only: a fit of least squares with fewer runs than the jacobian of a run is wide runs its runs one after another and evaluates the n residual vectors of every jacobian on all workers (JacobianPool, the workers of scipy.optimize.least_squares, OptimizationProblem.jacobian_map). A run spreads over as many workers as its jacobian has points (jacobian_width, one point per parameter for jac="2-point", two for 3-point), so a fit of two parameters on twelve workers still runs its runs in parallel, and a jacobian of the caller spreads over nothing. The workers initialize the problem before the budget of a run as they do for a population, the cost of every point is recorded in the trajectory in the order of the points, and workers of SciPy is refused for either optimizer, except its defaults 1 and None: n_cores gives the workers.
  • A profile of few parameters uses every core (#505). profile_likelihood of sbmlsim.fit.identifiability splits its cores the same way: an analysis of fewer scans than the jacobian of a re-optimization is wide, e.g. a profile of a single parameter with pids, runs its scans in the calling process and evaluates the points of the jacobian of every re-optimization on the workers. Until now the scans were the only parallelism, so a profile of one parameter used two cores whatever --cores said.
  • import sbmlsim checks the installed libroadrunner (sbmlsim.engine.check_roadrunner). sbmlsim simulates with a build of the develop branch of libroadrunner, which is not on PyPI, and another libroadrunner, e.g. the release of PyPI, loads the models and simulates them with other rows at the events and the changes of a simulation: a wrong install showed up as wrong results and not as an error. The import now compares the installed libroadrunner with the requirement of the metadata of the package and raises an ImportError which names the commands of Installation, the build from the index of the builds and then sbmlsim; SBMLSIM_SKIP_ROADRUNNER_CHECK=1 switches the check off, e.g. for a libroadrunner built from source. The check reads the metadata of two distributions and imports no roadrunner, 3 ms of an import of 650 ms.
  • The install instructions name libroadrunner first (Installation). Every install of the documentation, of scripts/published_install.py and of the jobs of the continuous integration now installs the build of libroadrunner from the index of the builds first (pip install --no-deps --index-url <index> "libroadrunner>=2.11.1.dev655") and then sbmlsim from PyPI, whose requirement the installed build satisfies, instead of asking the index for every package of one install with --extra-index-url, which GitHub Pages answers with a 503 now and then.

Fixes

  • The tox environments install again. tox-uv installs the dependencies of the package with uv pip install, which reads neither tool.uv.sources nor tool.uv.index of the project, so the floor libroadrunner>=2.11.1.dev655 of 0.21.0 could not be resolved and every environment failed before its first test. tox.ini gives the index of the builds of libroadrunner to the environments (set_env = UV_INDEX = ...); the environments still resolve from pyproject.toml and not from uv.lock.

Dependencies

  • packaging>=25.0 is a dependency of its own: sbmlsim.engine.check_roadrunner compares the installed libroadrunner with the requirement of the package with packaging.version. It is installed in every environment already, as a dependency of matplotlib and h5netcdf.
  • The workers of scipy.optimize.least_squares is part of SciPy since 1.16 and scipy>=1.18.1 was already required.
  • simrun>=0.3.2 of the simrun extra, the latest release of simrun, which the lock resolved already: 0.3.1 made the images and the runs on a k3d cluster faster and 0.3.2 is its release for the tests, the package of 0.3.1.