-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 0.23.0 #2372
Release 0.23.0 #2372
Conversation
* Refactor DEExporter/DEModel/csc_matrix Reduce unnecessary coupling: * `csc_matrix` as free function - removes the need for the codeprinter in DEModel * Move the codeprinter to `DEExporter` where it's actually needed * ..
…MICI-dev#2304) Currently, parameters that are targets of initial assignments don't show up as parameters or expressions in the amici model. This is rather not what most users would expect. As a first step: treat all SBML parameters that are initial assignment targets and whose initial assignment evaluates to a number as amici parameters. Related to AMICI-dev#2150.
No changes in functionality. Related to AMICI-dev#2306.
Start moving functionality for amici model code generation to a private subpackage `amici._codegen`. More to follow.
…CI-dev#2317) Adds an implicit conversion function to SUNMatrixWrapper make things more readable.
Cache remote files for tests locally via pooch, and cache the pooch cache for GitHub actions. Today, I had dozens of workflow failures due to rate-limiting or unavailability of biomodels. This is avoidable.
* Search for 64bit BLAS if supported by CMake. * On apple, try accelerate if nothing else was specified. Use the new interface (https://developer.apple.com/documentation/accelerate/blas). Fixes AMICI-dev#2286.
Move model compilation to a free function in a separate module. Easier to test and more reusable for recompilation after initial import. Related to AMICI-dev#2306
* Upgrade to SuiteSparse 7.6 * Update build scripts Closes AMICI-dev#2302
…MICI-dev#2305) Currently, parameters that are targets of initial assignments don't show up as parameters or expressions in the amici model. This is rather not what most users would expect. Therefore, treat all SBML parameters that are initial assignment targets and whose initial assignment does not evaluate to a number (for those that do, see AMICI-dev#2304) as amici expressions. Those static expressions will be handled more efficiently after AMICI-dev#2303. Related to AMICI-dev#2150. See also AMICI-dev#2304.
`SbmlImporter` should construct a `DEModel`, instead of `DEModel` importing an `SbmlImporter`. Will allow moving `DEModel` to a separate module. Closes AMICI-dev#2308.
Split expressions in `w` and its derivatives into dynamic (explicitly or implicitly time-dependent) and static ones. Evaluate static ones only when needed, i.e. after (re)initializing x_rdata or parameters. See AMICI-dev#1269
…#2323) ... to make space to move `amici.de_export.DEModel` to `amici.de_model` Related to AMICI-dev#2306.
…MICI-dev#2321) Move everything related to information on C++ model functions to a separate module. Related to AMICI-dev#2306. No changes in functionality.
…MICI-dev#2322) Simpler model diffs.
Move functionality for generating the ``amici::Model`` subclass code to a separate file. Related to AMICI-dev#2306
* Refactor de_export, extract DEModel Move `de_export.DEModel` to `de_model`. Closes AMICI-dev#2306. de_export is now down to 1.5K lines, from previously 4K+. Some further cleanup would be good, but it's a start. * .. * ..
) See [CVodeSetMaxConvFails](https://sundials.readthedocs.io/en/latest/cvodes/Usage/SIM.html#c.CVodeSetMaxConvFails) and [CVodeSetMaxNonlinIters](https://sundials.readthedocs.io/en/latest/cvodes/Usage/SIM.html#c.CVodeSetMaxNonlinIters). Closes AMICI-dev#2333.
Previously, the wrong array was checked 🙈: ```python amici_model.setAllStatesNonNegative() amici_model.setStateIsNonNegative([]) amici_model.setAllStatesNonNegative() Traceback (most recent call last): File "<ipython-input-22-d7056e8e4e3f>", line 1, in <module> amici_model.setAllStatesNonNegative() File "python/sdist/amici/amici.py", line 2243, in setAllStatesNonNegative return _amici.ModelPtr_setAllStatesNonNegative(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Dimension of input stateIsNonNegative (0) does not agree with number of state variables (2) ```
Finally works with Python3.12 without DeprecationWarnings
Previously, an exception during `ReturnData::processSimulationObjects` would result in program termination. Fixes AMICI-dev#1882.
fixes ``` Traceback (most recent call last): File "//./mnt/src/optimize.py", line 557, in <module> model, model_petab_problem = _model_import( File "/mnt/src/util.py", line 44, in _model_import model = amici.petab_import.import_petab_problem( File "/usr/local/lib/python3.10/dist-packages/amici/petab/petab_import.py", line 79, in import_petab_problem warn( NameError: name 'warn' is not defined ```
* Make log messages from ReturnData available through ReturnDataView. * Add `LogItem.__repr__` Closes AMICI-dev#2331.
Fixes some `used without template arguments` errors when running swig with `-builtin` or `-keyword`.
Fix `python -m build -n` for generated model packages. Fixes half of AMICI-dev#2285
Always include timepoints in NaN/Inf warnings Closes AMICI-dev#2328 --------- Co-authored-by: Fabian Fröhlich <[email protected]>
…2350) Current sympy master (tested: 0ededfcfc033ddca2d1d54a0eda85bf53c63761c): ```python IPython console for SymPy 1.13.dev (Python 3.12.2-64-bit) (ground types: python) In [1]: Float(0) == 0 Out[1]: False In [2]: Float(0).is_zero Out[2]: True ``` vs 1.12: ```python Python console for SymPy 1.12 (Python 3.12.2-64-bit) (ground types: python) >>> Float(0) == 0 True >>> Float(0).is_zero True ``` Therefore, replace `== 0` by `.is_zero`. Amongst other potential issues, this fixes zeros in sparse matrices. Closes AMICI-dev#2320.
Depending on swig options/versions, swig may or may not generate type annotations. With these changes, type annotations will be extracted from the docstrings where available, independent of the swig-generated type annotations. Closes AMICI-dev#2336.
No matter how we found the BLAS, make sure there is always BLAS::BLAS. Closes AMICI-dev#2354
* fix venv and BLAS * fixup * fixup? * Update runNotebook.sh * revert BLAS * remove virtualenv * remove venv creation from installAmiciSource * clear venv in buildInstall.sh * cleanup * doh * add venv back to installAmiciSource * readd numpy * export python executable in source install
Evaluate initial assignments to parameters to determine whether the targets are amici parameters or expressions. Related to AMICI-dev#2304. For example, it the initial assignment is `log(10)`, this should still be a parameter instead of an expression, but `sympy.log(10).is_Number` will be `False`.
`Solver::dky_` is always empty. Any call to `CVodeGetDky` should fail. Seems like it's never used.
…MICI-dev#2345) During PEtab import, parameters that are targets of initial assignments have so far not been turned into constant parameters, because they didn't exist in the amici model (see AMICI-dev#2304). Now that those parameters remain in the model, they should be turned into constant parameters, unless specified otherwise. Requires PEtab-dev/libpetab-python#248, otherwise PEtab parameter mapping will provide potentially incorrect values for those parameters.
* Update pandas.py * add doc + fix scales * fix venv and BLAS * fix tests * revert BLAS changes * Update scripts/installAmiciArchive.sh --------- Co-authored-by: Daniel Weindl <[email protected]>
* Improve debugging info in ReturnData * Add `ReturnData::t_last` that holds the last solver timepoint (Closes AMICI-dev#2246) * `ReturnData::J` is now the evaluted at `t_last` instead of the last successfully reached output timepoint (Closes AMICI-dev#2334) * `ReturnData::xdot` is now the evaluted at `t_last` instead of the last successfully reached output timepoint * skip xdot/J checks in case of failures
We only copy if the sizes match. Since the std::vector is not reallocated, there is no need to recreate the N_Vector.
In addition to the current `Model.setStateIsNonNegative`, this adds the option to set additional (non)negativity/positivity constraints to be enforced by the solver. See [CVodeSetConstraints](https://sundials.readthedocs.io/en/latest/cvode/Usage/index.html#c.CVodeSetConstraints) for details. Related to AMICI-dev#2327.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2372 +/- ##
==========================================
+ Coverage 77.81% 78.47% +0.66%
==========================================
Files 318 324 +6
Lines 20534 20864 +330
Branches 1436 1458 +22
==========================================
+ Hits 15979 16374 +395
+ Misses 4552 4487 -65
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Log stacktraces only in debug mode Closes AMICI-dev#2186
Some things were missing in AMICI-dev#2344
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, didn’t we release 0.23.0
a week ago?
* Doc: Fix headings in ExampleJax To properly integrate into our sphinx docs. * remove duplicated notebook
Yes. That was a busy week 😅 . |
No description provided.