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

Print CVXPY information when verbose=True #940

Closed
sbarratt opened this issue Feb 10, 2020 · 5 comments
Closed

Print CVXPY information when verbose=True #940

sbarratt opened this issue Feb 10, 2020 · 5 comments

Comments

@sbarratt
Copy link

Is your feature request related to a problem? Please describe.
Not related to a problem.

Describe the solution you'd like
When the argument verbose=True is passed to the Problem.solve method, print some status information about the CVXPY canonicalization, like canonicalization started, expression tree parsed, generating affine maps, sending to solver, etc...

@rileyjmurray
Copy link
Collaborator

I think this is a good idea.

I'm not sure about having verbose=True triggering cvxpy logging, but I definitely support the larger idea. As a possible alternative,Problem.solve could accept a keyword argument like canon_log. If someone called prob.solve(canon_log=True) then the behavior would log to sys.stdout. If someone called prob.solve(canon_log=my_stream) for some datastream my_stream, then sys.stdout would be untouched.

For an implementation, it would be most natural to have Reduction objects decide how to handle logging during their apply and invert phases. It would be easy to identify performance bottlenecks by having apply functions record time.time() when starting and finishing each reduction. There is a question of at what level these logs should be made, though.

Those are just some quick thoughts I have on the topic.

@akshayka
Copy link
Collaborator

I also think this is a good idea! I’m hesitant to add new arguments unless absolutely required, though, since they make the interface more complicated. Using the verbose argument to trigger CVXPY logging seems natural.

@andrea83ny
Copy link

love this thread ! Any sort of verbose would be incredibly useful.

@QCmonk
Copy link

QCmonk commented Dec 28, 2020

I would also support such a feature, would be very useful for checking progress on large problems with many constraints.

@sbarratt
Copy link
Author

Addressed in https://github.com/cvxgrp/cvxpy/pull/1251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants