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

feat: add is_parameter_timeseries trait, improve parameter timeseries indexing #75

Merged
merged 11 commits into from
Jun 13, 2024

Conversation

AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 94.08784% with 35 lines in your changes missing coverage. Please review.

Project coverage is 92.82%. Comparing base (c9c7b6c) to head (7b26af0).

Files Patch % Lines
src/parameter_indexing.jl 93.04% 19 Missing ⚠️
src/value_provider_interface.jl 75.86% 14 Missing ⚠️
src/index_provider_interface.jl 92.85% 1 Missing ⚠️
src/state_indexing.jl 98.61% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #75       +/-   ##
===========================================
+ Coverage   28.07%   92.82%   +64.75%     
===========================================
  Files          11       12        +1     
  Lines         513     1018      +505     
===========================================
+ Hits          144      945      +801     
+ Misses        369       73      -296     
Flag Coverage Δ
docs 34.95% <35.36%> (+6.88%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/src/api.md Outdated
#### Parameter timeseries

If the index provider contains parameters that change during the course of the simulation
at discrete intervals, it must implement the following methods to ensure correct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
at discrete intervals, it must implement the following methods to ensure correct
at discrete time points, it must implement the following methods to ensure correct

Copy link
Member Author

@AayushSabharwal AayushSabharwal May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9046cd7

docs/src/api.md Outdated
at discrete intervals, it must implement the following methods to ensure correct
functioning of [`getu`](@ref) and [`getp`](@ref) for value providers that save the parameter
timeseries. Note that there can be multiple parameter timeseries, in case different parameters
change at different times.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
change at different times.
may change at different times.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9046cd7

@@ -305,6 +313,164 @@ integrator.ps[:b] = 3.0
setp(integrator, :b)(integrator, 3.0) # functionally the same as above
```

## Parameter Timeseries

If a solution object saves modified parameter values (such as through callbacks) during the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If a solution object saves modified parameter values (such as through callbacks) during the
If a solution object includes modified parameter values (such as through callbacks) during the

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9046cd7

@AayushSabharwal AayushSabharwal force-pushed the as/param-timeseries branch 3 times, most recently from c228ec4 to 59fe65b Compare May 31, 2024 11:17
@AayushSabharwal AayushSabharwal marked this pull request as ready for review June 6, 2024 05:18
@AayushSabharwal
Copy link
Member Author

AayushSabharwal commented Jun 6, 2024

I'll reopen to run CI once MTK and SciMLBase are tagged (closed it a bit prematurely)

@AayushSabharwal
Copy link
Member Author

RAT downstream failure is an adjoint bug in SciMLBase

@AayushSabharwal
Copy link
Member Author

SciMLBase downstream failure is an MTK bug

@ChrisRackauckas ChrisRackauckas merged commit 5d00f2f into master Jun 13, 2024
49 of 65 checks passed
@ChrisRackauckas ChrisRackauckas deleted the as/param-timeseries branch June 13, 2024 13:19
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.

3 participants