Skip to content
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

taming main runs on ci/cd server #65

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
# Hence we do not perform them on a GitHub CI server
scaling_large_main(fitting=True)
scaling_large_main(fitting=False)
taming_main()

taming_main()
3 changes: 2 additions & 1 deletion experiments/markowitz.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import cvxpy as cp
import numpy as np
from utils import get_solver


@dataclass
Expand Down Expand Up @@ -110,7 +111,7 @@ def markowitz(data: Data, param: Parameters) -> tuple[np.ndarray, float, cp.Prob
]

problem = cp.Problem(cp.Maximize(objective), constraints)
problem.solve()
problem.solve(solver=get_solver())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to keep this function 1:1 in sync with the paper. I'd rather not install mosek on CI...

Suggested change
problem.solve(solver=get_solver())
problem.solve()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I don't want to install Mosek on CI/CD but I would prefer to have this function also able to run this during a test or for people without a license

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the points we make in the paper is that the solve method works without arguments. I think specifying one here defeats that point a bit (the only reason why we do specify one at all is to ensure replicability). How about this:
I'll update the README and requirements to make the distinction between exact replication (requires mosek license) and qualitative replication (no license required)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the hard dependency on mosek would install it for everybody. Maybe let's add a link to a page where people could download a 30 day license. Not testing code is a sin I could live with

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please assume that the average user has no Mosek license at hand. He will download and run this package and end up with an error message that no license is found. He/she will then argue that this is our fault and whether we can provide the missing license file :-)

assert problem.status in {cp.OPTIMAL, cp.OPTIMAL_INACCURATE}, problem.status
return w.value, c.value, problem

Expand Down