Skip to content
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

Adjoint event #1539

Draft
wants to merge 79 commits into
base: develop
Choose a base branch
from
Draft

Adjoint event #1539

wants to merge 79 commits into from

Conversation

paulstapor
Copy link
Contributor

No description provided.

@paulstapor paulstapor changed the base branch from master to develop August 5, 2021 11:31
@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Attention: Patch coverage is 21.81818% with 86 lines in your changes missing coverage. Please review.

Project coverage is 36.93%. Comparing base (b7a3e91) to head (0cede49).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/backwardproblem.cpp 7.14% 26 Missing ⚠️
python/sdist/amici/de_model.py 69.23% 8 Missing ⚠️
models/model_neuron/model_neuron.h 0.00% 5 Missing ⚠️
models/model_neuron_o2/model_neuron_o2.h 0.00% 5 Missing ⚠️
src/forwardproblem.cpp 16.66% 5 Missing ⚠️
models/model_nested_events/model_nested_events.h 0.00% 4 Missing ⚠️
models/model_calvetti/model_calvetti.h 0.00% 3 Missing ⚠️
models/model_dirac/model_dirac.h 0.00% 3 Missing ⚠️
models/model_events/model_events.h 0.00% 3 Missing ⚠️
...dels/model_jakstat_adjoint/model_jakstat_adjoint.h 0.00% 3 Missing ⚠️
... and 11 more

❗ There is a different number of reports uploaded between BASE (b7a3e91) and HEAD (0cede49). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b7a3e91) HEAD (0cede49)
cpp 1 0
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #1539       +/-   ##
============================================
- Coverage    77.79%   36.93%   -40.87%     
============================================
  Files          325      325               
  Lines        21053    20817      -236     
  Branches      1473     1473               
============================================
- Hits         16378     7688     -8690     
- Misses        4648    13087     +8439     
- Partials        27       42       +15     
Flag Coverage Δ
cpp ?
cpp_python 34.06% <21.81%> (+0.02%) ⬆️
petab 36.99% <15.71%> (-0.04%) ⬇️
python 31.42% <20.00%> (-40.92%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/amici/abstract_model.h 100.00% <ø> (ø)
include/amici/backwardproblem.h 100.00% <ø> (ø)
include/amici/forwardproblem.h 65.95% <100.00%> (-34.05%) ⬇️
include/amici/model.h 42.85% <ø> (-33.34%) ⬇️
include/amici/model_dae.h 0.00% <ø> (-75.00%) ⬇️
include/amici/model_ode.h 100.00% <ø> (ø)
python/sdist/amici/_codegen/cxx_functions.py 95.65% <ø> (ø)
src/abstract_model.cpp 0.55% <ø> (-4.98%) ⬇️
models/model_nested_events/deltaqB.cpp 0.00% <0.00%> (ø)
models/model_neuron/deltaqB.cpp 0.00% <0.00%> (ø)
... and 19 more

... and 222 files with indirect coverage changes

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

15.4% 15.4% Coverage
13.3% 13.3% Duplication

@dweindl dweindl linked an issue Nov 22, 2021 that may be closed by this pull request
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

# Conflicts:
#	include/amici/model.h
#	models/model_calvetti/model_calvetti.h
#	models/model_dirac/model_dirac.h
#	models/model_events/model_events.h
#	models/model_jakstat_adjoint/model_jakstat_adjoint.h
#	models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h
#	models/model_nested_events/model_nested_events.h
#	models/model_neuron/model_neuron.h
#	models/model_neuron_o2/model_neuron_o2.h
#	models/model_robertson/model_robertson.h
#	models/model_steadystate/model_steadystate.h
#	python/sdist/amici/de_export.py
#	src/model.cpp
dweindl added a commit to dweindl/AMICI that referenced this pull request Oct 9, 2024
Extract some neutral changes from AMICI-dev#1539 to reduce the diff there and avoid conflicts.
dweindl added a commit to dweindl/AMICI that referenced this pull request Oct 9, 2024
Extract some neutral changes from AMICI-dev#1539 to reduce the diff there and avoid conflicts.
dweindl added a commit to dweindl/AMICI that referenced this pull request Oct 9, 2024
Extract some neutral changes from AMICI-dev#1539 to reduce the diff there and avoid conflicts.
dweindl added a commit that referenced this pull request Oct 9, 2024
Extract some neutral changes from #1539 to reduce the diff there and avoid conflicts.
@dweindl
Copy link
Member

dweindl commented Oct 9, 2024

Resolved some conflicts and updated this branch.

Current status is that most tests pass and sensitivities look good, but for two cases, there are still issues, rather related to implementation than to choice of tolerances:

  • python/tests/test_events.py::test_models[events_plus_heavisides]

                 fsa        asa         fd      abs_diff      rel_diff
    k1      5.740767   5.740767   5.740766  4.469314e-12  7.785221e-13
    k2      4.146212   4.146212   4.146213 -7.933210e-12 -1.913363e-12
    k3     -2.278242  -2.278242  -2.278242  2.761347e-12 -1.212051e-12
    alpha  -0.593429  -0.593429  -0.593429 -4.544578e-09  7.658161e-09
    beta   -1.596328  -1.596336  -1.596324  8.518073e-06 -5.336042e-06 <------ ?!
    gamma   7.464110   7.464110   7.464111 -5.656077e-09 -7.577698e-10
    delta   6.290323   6.290323   6.290322 -7.910117e-12 -1.257506e-12
    eta    15.224854  15.221247  15.224853  3.607176e-03  2.369268e-04 <------ !!
    zeta   -9.385052  -9.385052  -9.385052 -3.037570e-13  3.236605e-14
    

    fd: finite differences
    abs_diff: fsa - asa
    rel_diff: abs_diff / fsa

  • python/tests/test_events.py::test_models[nested_events]

                   fsa       asa            fd      abs_diff      rel_diff
    k1        3.358876  3.358876  3.358875e+00 -1.590994e-11 -4.736686e-12
    k2        0.952255  0.952255  9.522543e-01 -2.982503e-12 -3.132044e-12
    inflow_1  1.888090  1.888090  1.888090e+00 -1.052491e-12 -5.574370e-13
    decay_1  -2.850859 -2.850859 -2.850860e+00  2.958522e-12 -1.037765e-12
    decay_2   1.150632  1.150112  1.150632e+00  5.200652e-04  4.519821e-04 <------ !!
    bolus     4.712958  4.712958  4.426220e+06 -1.454481e-11 -3.086132e-12 <------ fd?!
    

    Any contributions would be highly appreciated.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adjoint sensitivies for models with events
4 participants