-
-
Notifications
You must be signed in to change notification settings - Fork 64
MTK v11 release blog post #193
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
base: master
Are you sure you want to change the base?
Conversation
This post fully explains the licensing changes
AayushSabharwal
left a comment
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.
Mostly just grammatical/phrasing changes.
| ModelingToolkit compiler when ready. The ModelingToolkit tearing passes still need to improve their rules around | ||
| arrays to remove some scalarization, and this will happen in the v11 time frame as no breaking changes are required | ||
| for that. When completed, the generated code for array expressions will be O(1) in code size and compilation time. | ||
| This will solve a long-standing issue in the ModelingToolkit compiler, and approximately 80% of the work is now |
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.
80% seems a little over the top 😅 considering we still need tensor calculus. We also need to update StateSelection.jl's core data structures to support array equations, which it remains (rather blissfully) unaware of.
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.
what's a better guestimate?
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.
Uhm. I'd say around 60% best case.
|
This feels very premature to me. We need to make a community post explaining the situation on Discourse and solicit feedback before proceeding here. The community may have a strong feeling that the proposed split of MTK is not something they support, and they would prefer to just continue with an MIT MTK 10 as the SciML version (note, I'm not saying I'd personally advocate this direction). |
|
I talked with quite a few people and the issue with that is that it gives a false sense of choice. Continuing with the MIT MTK v10 version as the SciML version just isn't really on the docket. It's either we make it the project, in which case to compensate for the loses we need to get a private donor (because both EU and US sources have already been fully checked) of ~$15mil + 2 people who will leave their jobs to go full time on maintenance that are not part of that funding, or we do this route. The first is such a ridiculous ask that it sounds more like a satire, but we have all come to terms with that being the reality of the project by now, as explained in the post. I don't think the community will just find something to satisfy that in the next week or two, especially after we've had open calls for donations and maintainers since the start of the project. So it's either we leave the repo dead and abandoned, which still would need to probably find some compensation because that too can be a downside to further grant reviews, or we do this approach. At the end of the day, it's a false sense of choice unless some miracle happens. There are grants to submit for the next iteration of all entities, including MIT, and they all have had this requirement for years. And of course we can always merge backports to v10 (and v9) if anyone does show up with commits. |
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
|
edit: I have edited this as I thought the post had been merged and was not still open for comments. My apologies. |
|
At least for me, I would not vote to make this post / official announcement without providing an opportunity for community feedback. Even if the feedback post states that this is the only way to realistically continue MTK development. |
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
Co-authored-by: Aayush Sabharwal <[email protected]>
|
What do you think is the best way to share it? A link to this PR? |
| sustainable model for the project's future. I hope the complete honesty and transparency of these changes helps | ||
| everyone understand the reasoning behind the changes. And I, Chris Rackauckas, am available to talk about not | ||
| just the technical aspects but also the community and funding aspects of ModelingToolkit, SciML, and the rest of | ||
| the Julia ecosystem at any time. If you have any questions, feel free to reach out. Let's see if this makes the |
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.
Let's see if this makes the best version of the open source ecosystem.
Is this the best way to end such a blog post? It sounds a bit of a downer to my kiwi-lang. I'd either remove and end with "reach out", or something more positive.
Co-authored-by: Oscar Dowson <[email protected]>
|
I think it would be valuable to have some before/after timings for the loading times from the type stability and the refactoring work. A thought - it would be good to have a separate licensing blog post rather than having everything in the MTK V11 release post. |
Co-authored-by: Oscar Dowson <[email protected]>
Co-authored-by: Oscar Dowson <[email protected]>
@AayushSabharwal you have some of those? |
BeforeScriptimport REPL
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@variables x(t) = 1 y(t)
@parameters k f = 2.3
eqs = [D(x) ~ x * k + y, y ~ 2x + t]
dvs = Num[x, y]
ps = Num[k, f]
defs= Dict{Num, Float64}()
defs[y] = 2.3
print(Val(:z))
println("System")
@timev System(eqs, t, dvs, ps; defaults = defs, guesses = defs, name = :sys)
# print(Val(:a))
sys = System(eqs, t, dvs, ps; defaults = defs, guesses = defs, name = :sys)
print(Val(:a))
println("Complete")
@timev complete(sys)
print(Val(:b))
println("TearingState")
@timev TearingState(sys)
print(Val(:c))
println("mtkcompile")
@timev mtkcompile(sys)On Julia 1.11.7 with [email protected], with the command julia --check-bounds=yes -O 3 --project=@. --startup-file=no --trace-compile=bad.jl workload.jlTimings
AfterScriptimport REPL
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
using Symbolics: SymbolicT
@variables x(t) = 1 y(t)
@parameters k f = 2.3
eqs = [D(x) ~ x * k + y, y ~ 2x + t]
dvs = Num[x, y]
ps = Num[k, f]
ics = Dict{SymbolicT, SymbolicT}()
ics[y] = 2.3
println("System")
print(Val(:z))
@timev System(eqs, t, dvs, ps; initial_conditions = ics, guesses = ics, name = :sys)
print(Val(:zz))
# print(Val(:a))
sys = System(eqs, t, dvs, ps; initial_conditions = ics, guesses = ics, name = :sys)
println("Complete")
print(Val(:a))
@timev complete(sys)
print(Val(:aa))
println("TearingState")
print(Val(:b))
@timev TearingState(sys)
print(Val(:bb))
println("mtkcompile")
print(Val(:c))
@timev mtkcompile(sys)
print(Val(:cc))On Julia 1.11.7 with SciML/ModelingToolkit.jl#4044 with the command julia --check-bounds=yes -O 3 --project=@. --startup-file=no --trace-compile=bad.jl workload.jlTimings
With more improvements to come. |
| ModelingToolkitBase.jl is thus an MIT-licensed package with no Julia GPL dependencies and contains all | ||
| of the core functionality of ModelingToolkit.jl. This for example includes the utilities for building | ||
| `System`s, generating code for ODEs, SDEs, etc., and the main symbolic compiler pipeline. | ||
| ModelingToolkitBase.jl is thus a fully functional symbolic modeling compiler which can take symbolic | ||
| descriptions of systems and generate performant Julia code for them as-is. |
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.
| ModelingToolkitBase.jl is thus an MIT-licensed package with no Julia GPL dependencies and contains all | |
| of the core functionality of ModelingToolkit.jl. This for example includes the utilities for building | |
| `System`s, generating code for ODEs, SDEs, etc., and the main symbolic compiler pipeline. | |
| ModelingToolkitBase.jl is thus a fully functional symbolic modeling compiler which can take symbolic | |
| descriptions of systems and generate performant Julia code for them as-is. | |
| A new package **ModelingToolkitBase.jl** will be split out of what is now MTK, as an MIT-licensed package with no Julia GPL dependencies and contains all | |
| of the core functionality of ModelingToolkit.jl. This for example includes the utilities for building | |
| `System`s, generating code for ODEs, SDEs, etc., and the main symbolic compiler pipeline. | |
| ModelingToolkitBase.jl is thus a fully functional symbolic modeling compiler which can take symbolic | |
| descriptions of systems and generate performant Julia code for them as-is. |
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.
It's not really a split though, since it's basically ModelingToolkit of today. It's like 99% of what MTK is today.
Co-authored-by: Anshul Singhvi <[email protected]>
Co-authored-by: Anshul Singhvi <[email protected]>
|
This is good to go right, can we publish now? @isaacsas @devmotion @AayushSabharwal @ChrisRackauckas? Or is there something more we want to go through first? |
|
To be honest, I haven't read it yet. I'll give it a read this afternoon and leave comments if I have any (or just give an approval). |
isaacsas
left a comment
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.
I've read up to the discussion blaming funders for this change. I think this post is somewhat misleading to readers in attributing that as the only reason the change is necessary. It is clear that the immediate reason, as we stated in the Discourse post, was the behavior of JuliaHub competitors making it such that JuliaHub can not continue to fund a fully MIT MTK library. The funding issue is a complementary problem in that if we had sufficient grant funding developers could be hired outside of JuliaHub to carry out the work, but the immediate change is due to the competitors behavior and JuliaHub's response to it. (And indeed, when we edited the Discourse post JuliaHub removed most of the discussion about grant funding from the first draft I believe.) The behavior of competitors was also the reason that was initially given to the Steering Council in our discussions.
So let's be transparent here and make sure we fully explain the reasons, in line with the Discourse post (if this post is going to give reasons for the change). People had no issue with it there, so I don't think it needs to be avoided here.
| Thus we had to spend some time to really think through how to do this effectively in a way that would sustainable | ||
| for the future of the project. Ultimately the issue is that, unlike what has occured in the solver ecosystem, | ||
| almost all of the funding that has been achieved for ModelingToolkit.jl throughout its entire lifespan has had | ||
| both developer and government requirements for commercialization. While many may believe that the (US) government | ||
| supports open source software development and would prefer for this software to be distributed as free under a | ||
| permissive license, the reality is that government contracts and grants often have requirements for | ||
| commercialization. For full transparency, ModelingToolkit.jl has required about 3 full-time expert/senior | ||
| developers for the last 5 years, and the funding for this project has totaled around ~$250k (after overhead) of | ||
| government grants directed to the non-commercial aspects of the project (we thank Bernt Lie for his early | ||
| contributions via DigiWell and Chris Tessum for co-PIing on a related NSF grant). We additionally note that | ||
| total donations to the project have been <$10k over the full 10 years. |
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 not being fully honest about the situation in my opinion. The post on Discourse, and the comments when it was reviewed by JuliaHub, made clear that the primary motivator here is concerns about the behavior of JuliaHub competitors (as we said in that post). The grant funding issue was not something that anyone else from JuliaHub commented on (and even significantly cut down from the original draft Discourse post). While I agree that having grant funding to carry out this work outside of JuliaHub would make MTK sustainable on its own, it was not the immediate reason for this change (or even the first reason presented to the SciML council for why this change was necessary).
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.
I would say it is "all of the above" - but I do agree that this is better off not being in here.
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.
Cutting it out of the post and just linking the Discourse thread for details on why the split is happening would be fine with me.
Co-authored-by: Oscar Dowson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
|
I am happy with Sam's updates, but I do think it would make sense to have this published relatively soon now. |
|
Everyone approve? |
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
@sebapersson this is supported in the basic tearing pass of MTKBase as of release, and it should actually be a lot faster because the basic tearing pass has a much reduced complexity. |
This post fully explains the licensing changes