Open
Conversation
1 task
Member
|
I don't necessarily disagree with this, but I'd much prefer not to complicate what is already a complicated way of instantiating optimisers. I'm okay if there are a few places where we need custom instantiations, like in POI. |
Member
Author
|
Yes, we need a clearer picture of the layers we have, before we go forward. I was thinking of the layer constructor in the line of jump-dev/JuMP.jl#4014. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We might want to find a better name for this keyword argument, maybe
lazy_cache?In
MOI.instantiate, we have a sophisticated mechanism that adds a cache ifwith_cache_typeisnothingandwith_bridge_typeis set.This interprets
with_cache_type = nothingas the user saying, "I don't explictly need a cache type but if another layer needs one, sure go for it".Since the bridge layer needs one, we add one.
POI has the exact same use case as the bridge layer so it would be useful for POI to just say to
instantiate: "even if there is no bridge layer, do your magic in casewith_cache_type = nothingbecause I also need the incremental interface".With this new keyword argument, we get a simple solution in jump-dev/ParametricOptInterface.jl#239 that makes the behavior of instantiation with the POI layer consistent with the bridge layer