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

Deprecate separate lb, ub arguments to IntegralProblem #576

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

lxvm
Copy link
Contributor

@lxvm lxvm commented Dec 30, 2023

Fixes SciML/Integrals.jl#198
Fixes SciML/Integrals.jl#208

Specifically, this pr deprecates the following method:

@deprecate IntegralProblem(f::AbstractIntegralFunction,
    lb::Union{Number,AbstractVector{<:Number}},
    ub::Union{Number,AbstractVector{<:Number}},
    p = NullParameters(); kwargs...) IntegralProblem(f, (lb, ub), p; kwargs...)

@ChrisRackauckas this pr could also be a good time to decide on the promotion behavior for the endpoints of the integration domain. I actually think promotion should be handled at solve time since it could interfere with AD, e.g. using ForwardDiff and differentiating just the upper limit of integration.

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 Dec 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (416ca0a) 30.42% compared to head (4ca3c23) 27.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #576      +/-   ##
==========================================
- Coverage   30.42%   27.18%   -3.24%     
==========================================
  Files          53       53              
  Lines        4030     4021       -9     
==========================================
- Hits         1226     1093     -133     
- Misses       2804     2928     +124     

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

@ChrisRackauckas
Copy link
Member

this pr could also be a good time to decide on the promotion behavior for the endpoints of the integration domain. I actually think promotion should be handled at solve time since it could interfere with AD, e.g. using ForwardDiff and differentiating just the upper limit of integration.

Yes that's how we do it with the other problem types so it makes sense to do the same thing on IntegralProblem.

@ChrisRackauckas
Copy link
Member

I think this just needs to update the related tests and its good to go.

@ChrisRackauckas ChrisRackauckas merged commit 1be885a into SciML:master Dec 30, 2023
32 of 41 checks passed
@lxvm lxvm deleted the deprecate branch December 30, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants