-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Try to enable SI on 1.11 #1169
Open
isaacsas
wants to merge
18
commits into
SciML:master
Choose a base branch
from
isaacsas:enable_SI_on_1.11
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+24
−18
Open
Try to enable SI on 1.11 #1169
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b64ee55
try enabling SI on 1.11
isaacsas a751520
add warning for earlier Julia versions
isaacsas dc9620c
move SI tutorial back in place
isaacsas b0451dc
don't build HC tutorial
isaacsas a49b1f6
Merge remote-tracking branch 'origin/master' into enable_SI_on_1.11
isaacsas 57c8e2d
change up extension conditional
isaacsas 4a5191a
comment out correct issue
isaacsas c3a62d5
add end to module
isaacsas 61b8768
Merge branch 'master' into enable_SI_on_1.11
TorkelE 04ba45d
Update runtests.jl to 1.11.3 requirement
TorkelE 84ce6e8
Update CatalystStructuralIdentifiabilityExtension.jl to 1.11.3 requir…
TorkelE 01872fa
add ::ODESystem specification in assess_identifiability call
TorkelE 5c1cfd9
init
TorkelE d59ab30
run tests on more versions
TorkelE b57a659
Merge branch 'fix_tests' into enable_SI_on_1.11
TorkelE 79e31a0
re-add doc in right folder
TorkelE 83e209f
Remove <v1.11 warning (seems to work across all versions)
TorkelE d0493d2
Add comment in code explaining the fix
TorkelE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ let | |
ps = rnd_ps(custom_function_network_1, rng; factor) | ||
t = rand(rng) | ||
@test f_eval(custom_function_network_1, u0, ps, t) ≈ f_eval(custom_function_network_2, u0, ps, t) | ||
@test jac_eval(custom_function_network_1, u0, ps, t) ≈ jac_eval(custom_function_network_2, u0, ps, t) | ||
@test_broken jac_eval(custom_function_network_1, u0, ps, t) ≈ jac_eval(custom_function_network_2, u0, ps, t) # Weird error dur to some SciML update. Reported in https://github.com/SciML/ModelingToolkit.jl/issues/3447. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is actually done in #1192 (but this PR is based off that one). |
||
@test g_eval(custom_function_network_1, u0, ps, t) ≈ g_eval(custom_function_network_2, u0, ps, t) | ||
end | ||
end | ||
|
@@ -101,20 +101,20 @@ end | |
# Tests `ReactionSystem`s. | ||
let | ||
@species x(t) y(t) | ||
@parameters k v n | ||
@parameters k v n | ||
rs1 = @reaction_network rs begin | ||
mm(x, v, k), 0 --> x | ||
mmr(x, v, k), 0 --> x | ||
hill(x, v, k, n), 0 --> x | ||
hillr(x, v, k, n), 0 --> x | ||
hillar(x, y, v, k, n), 0 --> x | ||
hillar(x, y, v, k, n), 0 --> x | ||
end | ||
rs2 = @reaction_network rs begin | ||
v * x / (x + k), 0 --> x | ||
v * k / (x + k), 0 --> x | ||
v * (x^n) / (x^n + k^n), 0 --> x | ||
v * (k^n) / (x^n + k^n), 0 --> x | ||
v * (x^n) / (x^n + y^n + k^n), 0 --> x | ||
v * (x^n) / (x^n + y^n + k^n), 0 --> x | ||
end | ||
|
||
@test Catalyst.expand_registered_functions(rs1) == rs2 | ||
|
@@ -123,14 +123,14 @@ end | |
# Tests `Reaction`s. | ||
let | ||
@species x(t) y(t) | ||
@parameters k v n | ||
@parameters k v n | ||
|
||
r1 = @reaction mm(x, v, k), 0 --> x | ||
r2 = @reaction mmr(x, v, k), 0 --> x | ||
r3 = @reaction hill(x, v, k, n), 0 --> x | ||
r4 = @reaction hillr(x, v, k, n), 0 --> x | ||
r5 = @reaction hillar(x, y, v, k, n), 0 --> x + y | ||
|
||
@test isequal(Catalyst.expand_registered_functions(r1).rate, v * x / (x + k)) | ||
@test isequal(Catalyst.expand_registered_functions(r2).rate, v * k / (x + k)) | ||
@test isequal(Catalyst.expand_registered_functions(r3).rate, v * (x^n) / (x^n + k^n)) | ||
|
@@ -143,14 +143,14 @@ end | |
let | ||
@parameters T | ||
@variables X(T) Y(T) | ||
@parameters K V N | ||
@parameters K V N | ||
|
||
eq1 = 0 ~ mm(X, V, K) | ||
eq2 = 0 ~ mmr(X, V, K) | ||
eq3 = 0 ~ hill(X, V, K, N) | ||
eq4 = 0 ~ hillr(X, V, K, N) | ||
eq5 = 0 ~ hillar(X, Y, V, K, N) | ||
|
||
@test isequal(Catalyst.expand_registered_functions(eq1), 0 ~ V * X / (X + K)) | ||
@test isequal(Catalyst.expand_registered_functions(eq2), 0 ~ V * K / (X + K)) | ||
@test isequal(Catalyst.expand_registered_functions(eq3), 0 ~ V * (X^N) / (X^N + K^N)) | ||
|
@@ -166,7 +166,7 @@ let | |
@parameters v K | ||
eqs = [ | ||
Reaction(mm(X,v,K), [], [X]), | ||
mm(V,v,K) ~ V + 1 | ||
mm(V,v,K) ~ V + 1 | ||
] | ||
@named rs = ReactionSystem(eqs, t) | ||
|
||
|
@@ -211,7 +211,7 @@ let | |
(v * (X^n) / (X^n + K^n) > 1000.0) => [X ~ v * (K^n) / (X^n + K^n) + 2] | ||
] | ||
continuous_events = ModelingToolkit.SymbolicContinuousCallback.(continuous_events) | ||
discrete_events = ModelingToolkit.SymbolicDiscreteCallback.(discrete_events) | ||
discrete_events = ModelingToolkit.SymbolicDiscreteCallback.(discrete_events) | ||
@test isequal(only(Catalyst.get_rxs(rs_expanded)).rate, v0 + v * (X^n) / (X^n + Y^n + K^n)) | ||
@test isequal(get_continuous_events(rs_expanded), continuous_events) | ||
@test isequal(get_discrete_events(rs_expanded), discrete_events) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is the bit that solves it. What actually goes on is a royal mystery, but there is some discussion here: https://discourse.julialang.org/t/how-to-debug-an-error-in-type-inference/126122/8 and here: SciML/StructuralIdentifiability.jl#360