-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add params to control solver, default Clarabel, pin cvxpy version #1975
Add params to control solver, default Clarabel, pin cvxpy version #1975
Conversation
…octor_visits cvxpy to >=1.5
logger, | ||
) if weekday else None | ||
if weekday and np.any(np.all(params == 0,axis=1)): | ||
params = ( |
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.
if you want to get a smaller diff, you can probably revert the changes to this file, which will get it ignored by the linter.
Co-authored-by: george <[email protected]>
Co-authored-by: george <[email protected]>
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.
plz change the test data formatting, and then this is good to go!
expected_result = [ | ||
-0.05993665, | ||
-0.0727396, | ||
-0.05618517, | ||
0.0343405, | ||
0.12534997, | ||
0.04561813, | ||
-2.27669028, | ||
-1.89564374, | ||
-1.5695407, | ||
-1.29838116, | ||
-1.08216513, | ||
-0.92089259, | ||
-0.81456355, | ||
-0.76317802, | ||
-0.76673598, | ||
-0.82523745, | ||
] |
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.
could you make the format of this match the non-legacy test above so its easier to eyeball the differences in values?
wd_params = ( | ||
Weekday.get_params_legacy( | ||
data_frame, | ||
"den", | ||
["num"], | ||
Config.DATE_COL, | ||
[1, 1e5], | ||
logger, | ||
) | ||
if self.weekday | ||
else None | ||
) |
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.
the linter is a cruel mistress! id argue that my suggestion has a better style, even if the previous format passed, but the existing code is a fossilized remnant so do what thou wilt...
wd_params = ( | |
Weekday.get_params_legacy( | |
data_frame, | |
"den", | |
["num"], | |
Config.DATE_COL, | |
[1, 1e5], | |
logger, | |
) | |
if self.weekday | |
else None | |
) | |
if weekday: | |
wd_params = Weekday.get_params_legacy( | |
data_frame, | |
"den", | |
["num"], | |
Config.DATE_COL, | |
[1, 1e5], | |
logger, | |
) | |
else: | |
wd_params = None |
Rollback this change and replace with version pinning
Description
ECOS solver is used by hospital admissions (claims_hosp) and doctor_visits weekday-adjusted signals. Recently this solver causes severe numerical problems in some of doctor_visits outlier datapoints. This is not a problem in hospital admissions. Therefore, we change the solver used in doctor_visits to Clarabel and keep ECOS use in claims_hosp for consistency.
Knowing that the default solver in cvxpy 1.5 onward will be Clarabel while previous versions keep ECOS, we pin the versions accordingly for these two indicators.
Changelog
Fixes