cvxportfolio icon indicating copy to clipboard operation
cvxportfolio copied to clipboard

Error out on Policy.py when running MPO example

Open kch382001 opened this issue 5 years ago • 5 comments

When running MPO example, I got error message on this line in policy.py file:

z = cvx.Variable(*w.size) #----- Error Out wplus = w + z

It looks like the line does not work for any cvxpy version > cvxpy1.0. Need to change it to z = cvx.Variable(w.size) to make it work.

kch382001 avatar Sep 05 '19 19:09 kch382001

It would be nice if all these issues are fixed. And at least we can get these jupyter notebook examples to run through without problem.

kch382001 avatar Sep 05 '19 19:09 kch382001

Hello @kch382001. Thanks for finding the errors in the example code. I know I had to fix a few of them to get mine to run.

When you make an issue on github, here or anywhere, please specify more detail about what the error is, in which file and on what line the error is at, and why the error occurs if known. Also please format you code by using the github formatting options, such as

z = cvx.Variable(*w.size) #----- Error Out
wplus = w + z

And include what versions of relevant packages you are using. Also please provide the full output of any error including stack trace.

joseortiz3 avatar Sep 05 '19 19:09 joseortiz3

Thanks for the reply. Will follow the github convention in the future. The cvxportfolio is a good framework, a faithful implementation of the paper. It would be great to see higher usage in the future if these bugs are fixed. There are several issues related to different version of numpy, python and cvx. I opened new issues on these bugs. Thanks for the quick reply. Really appreciate it.

Sent from my iPhone

On Sep 5, 2019, at 3:59 PM, Jose Ortiz [email protected] wrote:

Hello @kch382001. Thanks for finding the errors in the example code. I know I had to fix a few of them to get mine to run.

When you make an issue on github, here or anywhere, please specify more detail about what the error is, in which file and on what line the error is at, and why the error occurs if known. Also please format you code by using the github formatting options, such as

z = cvx.Variable(*w.size) #----- Error Out wplus = w + z And include what versions of relevant packages you are using. Also please provide the full output of any error including stack trace.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

kch382001 avatar Sep 06 '19 00:09 kch382001

@kch382001 You should also write descriptive titles about what the error is specifically, not "error out".

joseortiz3 avatar Sep 09 '19 23:09 joseortiz3

Sorry. Will do next time.
I guess this package is not well maintained. So many obvious bugs.

Sent from my iPhone

On Sep 9, 2019, at 7:40 PM, Jose Ortiz [email protected] wrote:

@kch382001 You should also write descriptive titles about what the error is specifically, not "error out".

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

kch382001 avatar Sep 10 '19 01:09 kch382001