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

fix: remove implicit MTK dependency, other bug fixes, MTKv9 compatibility #603

Merged
merged 10 commits into from
Feb 1, 2024

Conversation

AayushSabharwal
Copy link
Member

Contrary to the name of the branch, this PR should be able to be merged without MTKv9

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 Jan 25, 2024

Codecov Report

Attention: 55 lines in your changes are missing coverage. Please review.

Comparison is base (5d3ac43) 39.96% compared to head (7be3e98) 26.35%.
Report is 6 commits behind head on master.

❗ Current head 7be3e98 differs from pull request most recent head 3eb2f15. Consider uploading reports for the commit 3eb2f15 to get more accurate results

Files Patch % Lines
src/solutions/optimization_solutions.jl 12.90% 27 Missing ⚠️
src/remake.jl 63.63% 12 Missing ⚠️
src/scimlfunctions.jl 56.00% 11 Missing ⚠️
src/solutions/solution_interface.jl 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #603       +/-   ##
===========================================
- Coverage   39.96%   26.35%   -13.62%     
===========================================
  Files          54       54               
  Lines        4076     4113       +37     
===========================================
- Hits         1629     1084      -545     
- Misses       2447     3029      +582     

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

src/remake.jl Outdated Show resolved Hide resolved
src/remake.jl Outdated Show resolved Hide resolved
src/scimlfunctions.jl Outdated Show resolved Hide resolved
@AayushSabharwal AayushSabharwal force-pushed the as/mtk-v9 branch 2 times, most recently from 4683adc to defdcb2 Compare January 30, 2024 10:56
src/remake.jl Outdated
@@ -69,12 +69,9 @@ function remake(prob::ODEProblem; f = missing,
u0 = prob.u0
end
if (eltype(p) <: Pair && !isempty(p)) || (eltype(u0) <: Pair && !isempty(u0)) # one is a non-empty symbolic map
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :ps) ||
has_sys(prob.f) ||
Copy link
Member

Choose a reason for hiding this comment

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

Let's solve SciML/DifferentialEquations.jl#922 at the same time here. If it doesn't have a system, then we shouldn't care what p is an just use it. p in a general diffeq is allowed to be a dictionary or Pair thing if people want, we shouldn't care.

But also, let's add a keyword argument interpret_symbolicmap = true and change the error message saying that this can be bypassed by setting that to false.

Copy link
Member Author

@AayushSabharwal AayushSabharwal Feb 1, 2024

Choose a reason for hiding this comment

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

Fixed in c503cf8

Comment on lines 4070 to 4075
function sys_or_symbolcache(sys, syms, paramsyms, indepsym = nothing)
if sys === nothing && (syms !== nothing || paramsyms !== nothing || indepsym !== nothing)
sys = SymbolCache(syms, paramsyms, indepsym)
end
return sys
end
Copy link
Member

Choose a reason for hiding this comment

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

The syms stuff is deprecated, I don't get why this is still staying around. If anything it should throw a big warning not to use it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should I remove the keywords from the constructors or just @warn?

Copy link
Member

Choose a reason for hiding this comment

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

I guess @warn since it was accidentally documented, and remove it from the docstrings.

Copy link
Member Author

@AayushSabharwal AayushSabharwal Feb 1, 2024

Choose a reason for hiding this comment

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

Fixed in 7be3e98

src/remake.jl Outdated Show resolved Hide resolved
src/remake.jl Outdated Show resolved Hide resolved
@ChrisRackauckas ChrisRackauckas merged commit 006f638 into SciML:master Feb 1, 2024
31 of 39 checks passed
@AayushSabharwal AayushSabharwal deleted the as/mtk-v9 branch February 1, 2024 16:46
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