Releases: AMICI-dev/AMICI
AMICI v1.0.1
Fixes
- Fixed an issue that resulted in failure to import the
PetabImporterif
the jax-dependencies weren't installed. - Fixed a pandas>=3.0 compatibility issue in the PEtab importer which resulted
in incorrect selection of fixed parameters. - Fixed logger configuration for simulation warnings/errors, such that users
can adjust the log level or simulations with, e.g.,
logging.getLogger("amici.sim.sundials").setLevel(logging.ERROR) - Fixed various broken links and outdated function names in the documentation.
Full Changelog: v1.0.0...v1.0.1
AMICI v1.0.0
What's Changed
The AMICI 1.0 release comes with many changes related to making the API more consistent and modular. On the feature side, a highlight is support for the new PEtab 2.0 format for both the JAX and SUNDIALS interface.
Documentation: https://amici.readthedocs.io/en/v1.0.0/
With contributions by @BSnelling, @dilpath, @dweindl, @FFroehlich
BREAKING CHANGES
Removed functionality
The following functionality has been removed without replacement:
- The complete MATLAB interface has been removed.
amici.sbml_import.species_to_parametershas been removed.
API changes
- For a more consistent API, all function names are now
snake_caseinstead ofcamelCase. - The package has been reorganized.
- All importers have been moved to
amici.importerssubpackages. For example, all functionality fromamici.sbml_importis now available inamici.importers.sbml. - All simulation-related functionality has been moved to
amici.sim.sundialsfor the SUNDIALS interface, andamici.sim.jaxfor the JAX interface. - A number of functions and modules have been made private (i.e., their name starts with
_or they are excluded from__all__), as they are not intended for public use and may change without deprecation.
- All importers have been moved to
- The naming of free and fixed parameters has been harmonized across the API:
AMICI differentiates between parameters with respect to which a model can compute sensitivities ("free parameters") and parameters with respect to which no sensitivities can be computed ("fixed parameters").
"Free" and "fixed" are to be understood in the context of parameter estimation, where free parameters are optimized,
while fixed parameters remain constant. Free parameters were previously referred to as just "parameters", and
fixed parameters as "fixed parameters", "constant parameters", or "constants". This has now been harmonized to "free" and "fixed" across the API. E.g.,Model.setParameters()is nowModel.set_free_parameters(). ReturnDataView.posteq_numstepsandReturnDataView.preeq_numstepsnow return a one-dimensional array of shape(num_timepoints,)instead of a two-dimensional array of shape(1, num_timepoints).ReturnDataView.posteq_statusandReturnDataView.preeq_statusnow returnlist[SteadyStateStatus]instead of anndarray[int]of shape(1, 3).- The way the observation model is passed to the different import functions (
sbml2amici,pysb2amici, ...) has changed:
The information previously split acrossobservables,sigmas,noise_distributions,event_observables,event_sigmas, and
event_noise_distributionsdicts is now passed as a singleobservation_model: list[MeasurementChannel]argument. assignmentRules2observableshas been renamed toassignment_rules_to_observablesand now returnslist[MeasurementChannel]to be passed to the import functions.AmiVector::getLengthandAmiVectorArray::getLengthhave been renamed tosizeto be more consistent with STL containers.amici.petab.petab_import.import_modelhas been removed. Useamici.importers.petab.v1.import_petab_probleminstead.Model.getSolverhas been renamed toModel.create_solver, emphasizing that a newSolverinstance is created on each call.amici.runAmiciSimulationandamici.runAmiciSimulationshave been renamed toamici.sim.sundials.run_simulationand
amici.sim.sundials.run_simulations, respectively.- The following deprecated functionality has been removed:
NonlinearSolverIteration::functionalhas been removed, useNonlinearSolverIteration::fixedpointinstead.- The deprecated argument
log_as_log10toSbmlImporter.sbml2amiciandSbmlImporter.sbml2jaxhas been removed. Just remove this argument, as this never had any effect. - Deprecated imports from
amici.petab.*inamici.petab.simulationshave been removed. Import those functions directly from their respective modules. - The
force_compileargument toimport_petab_problemhas been removed. See thecompile_argument.
- Model output directory keyword arguments have been harmonized:
What was previouslymodel_output_dir,output_dir,outdiris now consistently calledoutput_diracross the API. - Plotting functions have been moved from
amici.plottingtoamici.sim.sundials.plotting. Themodelargument has been removed.
Features
-
Support for the PEtab data format v2.0.0 (draft) for the JAX and SUNDIALS interfaces.
See
amici.importers.petab.PetabImporterand examples for JAX and SUNDIALS.For JAX-based models, the interface can be considered stable; for SUNDIALS-based models, the API may still change.
SBML- and PySB-based PEtab problems are currently supported. For PySB-based PEtab problems, only species and
pysb.Expressionare supported as condition table targets (i.e., no parameters yet).PEtab v1 import for SUNDIALS-based models is still available via
amici.importers.petab.v1. Once PEtab v2 import has been stabilized, PEtab v1 import for SUNDIALS-based models will be removed. -
Many relevant
ReturnDatafields are now available asxarray.DataArrayviaReturnData.xr.{x,y,w,x0,sx,...}.
DataArrays include the identifiers and are often more convenient than the plain numpy arrays. This allows for easy subselection and plotting of the results, and conversion to DataFrames. -
Model.simulate()has been added as a convenience function to run simulations without having to create aSolverobject explicitly.
This is a wrapper for bothamici.sim.sundials.run_simulationandamici.sim.sundials.run_simulations,
depending on the type of theedataargument. It also supports passing someSolveroptions as keyword arguments.
This is intended for interactive use; for better full control and performance, it is still recommended to create aSolverobject and callamici.sim.sundials.{run_simulation,run_simulations}directly. -
Improved
picklesupport foramici.sim.sundials.{Model,ModelPtr,Solver,ExpData}.
Note that AMICI's pickling support is only intended for short-term storage or inter-process communication.
Reading pickled objects after updating AMICI or the model code will almost certainly fail.ModelandModelPtrnow support sufficient pickling for use in multiprocessing contexts. This works only if the amici-generated model package exists in the same file system location and does not change until unpickling.Solveris now picklable if amici was built with HDF5 support.
This only works on shared file systems, as the solver state is stored in a temporary HDF5 file.ExpDatais now picklable.
-
The import function
sbml2amici,pysb2amici, andantimony2amicinow return an instance of the generated model class if called withcompile=True(default). -
The default directory for model import changed, and a base directory can now be specified via the
AMICI_MODELS_ROOTenvironment variable. Seeamici.get_model_dirfor details. -
IDs and names of model entities are now not only accessible via
amici.sim.sundials.Model, but also viaamici.sim.sundials.ReturnData(ReturnData.{free_parameter_ids,observable_ids,...},ReturnData.free_parameter_names,observable_names,...}).
Fixes
- Fixed a bug that potentially results in incorrect handling of discontinuities their location depends on a state variable that is subject to an event assignment but otherwise constant.
Full Changelog: v0.34.1...v1.0.0
AMICI v0.34.2
Bugfix release.
- Python 3.14 compatibility
- Swig 4.4.0 compatibility
- Fixes a bug that resulted in incorrect processing of initial assignments
containing (amici-)splines - Fixes an SBML import error during the handling of algebraic rules
- Fixes a CMake error with certain CMake versions
- Fixes type annotations in swig wrappers
Full Changelog: v0.34.1...v0.34.2
AMICI v0.34.1
Bugfix release.
- Fixed a bug that would lead to incorrect model initialization in SBML models
with initial assignments that depend on dynamic entities
(by @dweindl in #2939)
Full Changelog: v0.34.0...v0.34.1
AMICI v0.34.0
The amici 0.34.0 release contains a number of bug fixes and new features.
Note that this will probably be the last release to include the MATLAB interface.
Fixes
- Breaking changes Events are now also handled during pre-equilibration, presimulation, and post-equilibration.
This may be a breaking change, as it may lead to different results for models with events that may trigger during these periods. This change is considered a bugfix, as it was not intended to ignore events during these periods.
(by @dweindl in #2777, #2780, #2859, #2881, #2889, #2920, #2921, #2925) - Fixed various issues related to adjoint sensitivity analysis for models with events.
While many cases are now supported, it is still highly recommended to check the ASA results for models with events against forward sensitivities or finite differences.- Adjoint sensitivities for Python-imported models with events (by @paulstapor & @dweindl in #1539)
- Fix Model::addAdjointQuadratureEventUpdate (by @dweindl in #2787)
- Fix indexing errors for adjoint quadratures during event updates (by @dweindl in #2796)
- Fix deltaxB dimensions (by @dweindl in #2803)
- Fix (some) ASA event handling (by @dweindl in #2797)
- Fixed a number of issues related to the handling of events or discontinuities in general:
- Fixed sign of residuals (by @dweindl in #2896)
- Updated the steady state notebook to match the current implementation (by @plakrisenko & @dweindl in #2891)
- Improved sigma<=0 error reporting (by @FFroehlich in #2829)
- Fixed sensitivities for the total abundances of conservation laws (only relevant if
AMICI_EXPERIMENTAL_SBML_NONCONST_CLSis enabled) (by @dweindl in #2782) - Fix sensitivities w.r.t. unused log-scaled NaN parameters (by @dweindl in #2903)
Features
- AMICI should now be pip-installable without pre-installing SWIG or BLAS (by @dweindl in #2774, #2772)
- Event/discontinuity handling for JAX models
- Track discontinuities in JAX & fix gradient for models with parameter dependent roots (by @FFroehlich in #2815)
- Improve JAX event integration (by @FFroehlich in #2841)
- mask event functions in jax (by @FFroehlich in #2863)
- Handle state-independent, parameter-dependent event triggers without root-finding (by @dweindl in #2913)
- Presimulation is now also supported in combination with adjoint sensitivities (by @dweindl in #2786)
- It is now possible to set a separate
$t_0$ for pre-equilibration and main simulation (by @dweindl in #2793) - Sensitivity analysis for
AlgebraicRule/ DAE models is now also supported for Python-imported models
(by @dweindl in #2101) - An optional random generator seed can now be passed to
ExpData::ExpData(ReturnData const&, ...)when generating synthetic measurements (by @dweindl in #2802) - Added
ReturnData::plist(by @dweindl in #2874)
... and extended tests, documentation, and many changes under the hood.
Full Changelog: v0.33.0...v0.34.0
AMICI v0.33.0
Note that this release requires Python >= 3.11.
Fixes
-
Fixed an issue in SBML AlgebraicRule processing leading to import failure if a species occurred in multiple AlgebraicRules
-
Fixed a potential segfault when running forward sensitivity analysis for models without state variables
by @FFroehlich in #2749
-
Fixed a dimension bug for presimulation parameters in ExpDataView
by @FFroehlich in #2746
-
Fixed incorrect initialization for initial assignments with explicit time dependence
Features
-
AMICI now supports SBML events with
use_values_from_trigger_time=true -
AMICI now supports SBML events with constant priorities
Other changes
-
doc: Added a caveats section listing some known issues and potentially unexpected behavior in AMICI
-
Added warnings for presimulation and steady state simulation with events. So far, events were not fully supported in these modes. This is subject to change.
Full Changelog: v0.32.0...v0.33.0
AMICI v0.32.0
Breaking changes
-
Removed deprecated
amici.petab_*modules (now underamici.petab.*) -
Removed deprecated CLI options to
amici_import_petab
Changed requirements
-
AMICI now requires a C++20-compatible compiler
-
AMICI now requires swig>=4.1
-
AMICI now uses the sbmlmath package for sympification of SBML math constructs
Fixes
-
Fixed Heaviside functions for
<,><=,>=which could have lead to incorrect simulation results.Note that
>and>=, as well as<and<=can't be distinguished in some cases (see #2707). Avoid situations where this would matter. -
Prevent segfaults under pytest after swig4.3 wrapping
-
Fixed
SetuptoolsDeprecationWarning: \project.license` as a TOML table is deprecated` -
Updated Dockerfile, use Ubuntu 24.04 LTS
-
SBML import: Handle unsolvable event triggers
-
Added RTFUNC_FAIL simulation status
-
doc: Enable building docs with Python 3.13
-
Fixed crash for models without state variables
-
SBML import: avoid repeated xdot==0 checks
-
Fixed Boolean to float conversion issues during SBML import
Features
-
Support for XOR,
==and!=operators in SBML modelsNote that not all (combinations of) Boolean functions will work well with AMICI's root-finding. It's recommended to verify the results.
Full Changelog: v0.31.2...v0.32.0
AMICI v0.31.2
Bugfix-only release.
- SBML import: Handle unsolvable event triggers
by @dweindl in #2686 - Fixed a clang compiler warning related to variable length arrays
by @FFroehlich in #2688 - Temporarily require interpax<=0.3.6
by @dweindl in #2678 - Update OpenBLAS installation script to work with CMake>=4
by @dweindl in #2679 - GHA: Don't run cron jobs on forks by @dweindl in #2669
- Fixed Matlab documentation build with CMake 4.0
by @dweindl in #2676
Full Changelog: v0.31.1...v0.31.2
AMICI v0.31.1
Bugfix-only release.
Full Changelog: v0.31.0...v0.31.1
AMICI v0.31.0
- Added
RDataReporting::observables_likelihoodfor computing observables, likelihood and the respective sensitivities
by @dweindl in #2627, #2633 - JAX:
- Updated diffrax & jaxlib
by @FFroehlich in #2632 - Avoid silent preequilibration failure in JAX
by @FFroehlich in #2631 - jax vectorisation
by @FFroehlich in #2636 - No flattening of timepoint specific overrides in jax
by @FFroehlich in #2641
- Updated diffrax & jaxlib
- Faster PEtab parameter mapping
by @dweindl in #2638, #2640
Full Changelog: v0.30.1...v0.31.0