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.
Some of the problems that we are experiencing in Catalyst arise from
complete
doing more than just setting up namespacing. It doesn't really make sense to inject new parameters like initial conditions into aReactionSystem
, as such systems encode a variety of mathematical models, some of which have no notion of an initial condition. That injection should really only occur for a converted system that is in a concrete MTK mathematical system type (i.e. ODEs, SDEs, etc).This PR attempts to address that by making it possible for us to dispatch
complete
in a way that we can opt-out of modifications tops
. In the future, hopefully complete-related changes tops
can be restricted to whenallow_additional_ps = true
, for which we will dispatchcomplete(::ReactionSystem)
to always passfalse
.Note that a better approach might be to not have namespacing tied into completion. We could completely ignore
complete
in Catalyst if it was handled separately. But I assume this would be breaking.