-
Notifications
You must be signed in to change notification settings - Fork 97
[Utilties] don't throw UnsupportedAttribute in pass_attributes #1656
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
Conversation
|
I tested GLPK.jl and it passed, but I didn't run the MOI tests. I don't really see why we shouldn't throw here. We've already figured out we're going to throw an error, so why not now? There should be other tests that catch incorrect usage in other parts of the API. |
|
Can't the
If you completely revert it, "We've already figured out" won't apply anymore |
|
We still need to be able to skip names and start values, so we need the |
|
Bump @blegat |
|
Indeed, the PR moved this
That's one way to read this but when I read this code, I don't understand why we throw since
The top PR comment of #1613 says
So the motivation was that |
|
So is that a yay/nay on merging this then? |
|
Ah. I found the problem: using SCS
const MOI = SCS.MOI
model = MOI.instantiate(SCS.Optimizer, with_bridge_type = Float64)
MOI.copy_to(model, MOI.Test.BadModelAttributeModel()) # No error. Should throw unsupported attributeWhy? Because the model has a cache: julia> model
MOIB.LazyBridgeOptimizer{MOIU.CachingOptimizer{SCS.Optimizer, MOIU.UniversalFallback{MOIU.Model{Float64}}}}
with 2 variable bridges
with 0 constraint bridges
with 0 objective bridges
with inner model MOIU.CachingOptimizer{SCS.Optimizer, MOIU.UniversalFallback{MOIU.Model{Float64}}}
in state EMPTY_OPTIMIZER
in mode AUTOMATIC
with model cache MOIU.UniversalFallback{MOIU.Model{Float64}}
with 1 model attribute
fallback for MOIU.Model{Float64}
with optimizer SCS.OptimizerWe'll throw the error on I think we should revert this PR; it broke tests for SCS. |
|
Yeah, this caused pretty widespread breakage in the SolverTests: https://github.com/jump-dev/SolverTests/runs/4316646996?check_suite_focus=true |
Closes #1614
@blegat's argument being that there should already be some fallbacks for this, and catching it here might obscure other bugs.