-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Softly deprecate PSD by removing it from the docs #3959
Conversation
@@ -158,7 +158,7 @@ function example_k_means_clustering() | |||
end | |||
model = Model(Clarabel.Optimizer) | |||
set_silent(model) | |||
@variable(model, Z[1:m, 1:m] >= 0, PSD) | |||
@variable(model, Z[1:m, 1:m] >= 0, set = PSDCone()) |
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 one is a reason not to stop using PSD
. It's clunky, and I can see people getting tripped up over it.
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 like it with the "set", the PSD one does not look better to me
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.
Would you think its clearer if we replace ">=0" by "lower_bound=0".
I would not mind.
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.
No I want to keep this as it was... We have nice syntax. There's no need to use lower_bound=0
like we're a Python library.
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.
Was the main reason to stop using PSD because VariableInSet
is confusing?
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 dont agree that
x >= 0, PSD
Is better than
x >= 0, set = ...
We should decide if its legacy or not.
For me it felt like it was.
For @blegat the same.
We can keep it, but if we do, we should have PSDRef.
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.
We can keep it, but if we do, we should have PSDRef.
We have VariableInSetRef though?
What about #3960
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 agree that x >= 0, set = PSDCone()
is nice and I'm not missing x >= 0, PSD
.
With , PSD
, you're saving a few keystrokes but then it's unclear how to adapt it to hermitian, SOC, etc...
At least, with set = PSDCone()
the user learns something that is transferrable
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'm missing x >= 0, PSD)
. I vote we leave as-is and wait for more people to ask how to get the dual of a variable constraint.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3959 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 43 43
Lines 6054 6085 +31
=========================================
+ Hits 6054 6085 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'm not convinced that this is a good idea. |
I would not mind adding a note to the variable macro docstring asking to use "set =..." |
It's kinda weird to be completely removing syntax from the docs. What if someone is trying to read existing code? |
I think this is especially true because it is magic syntax in the macro. You can't look it up as |
Closing because I don't particularly want to do this. Let's see how |
My suggestion was to remove PSD everywhere, except from the |
We could at least use |
@@ -1082,13 +1082,13 @@ julia> model[:x] | |||
|
|||
## Semidefinite variables | |||
|
|||
Declare a square matrix of JuMP variables to be positive semidefinite by passing |
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.
We could just say here that there are the two possibilities at least, we should reopen and merge part of the changes of this PR.
Is it though? |
x-ref #3955 (comment)
Thoughts?