-
Notifications
You must be signed in to change notification settings - Fork 258
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
Multiprocess error in HelloWorld #54
Comments
Check what happens if you run with parallel=False in run_multiple_backtest(). I know Windows has some RunTime errors. I recall something about "freeze_support" issues. But On Linux boxes it doesn't happen. All of this to determine that what you have might be the dimension problems raised in issue #52. |
I get this error when I try with the parallel=False. I also tried to backtest each of the policies individually and cp.Hold() is fine but spo_policy fails with the same error as above. |
Use an interactive debugger and set a breakpoint before
Using the interactive debugger, check the shape of Problems like these can be avoided by These shape problems have no dependence on the OS one uses, nor does it have anything to do with multiprocessing, it's purely the shapes of the dataframes. |
I ran into this as well. As per my previous comment, we now we know this isn't a multiprocessor issue but the shape/dimension issue (multiprocessor on makes it difficult to debug IMHO). If you are using the FactorModelSigma or RobustFactorModelSigma, there are some transposes in the that caused these issues. I'm away from my other computer with cvxportfolio at the moment but will offer some suggestions later this week. As Jose mentions, because there is little clarity on the shapes/types of objections expected by cvxportfolio it only adds to the confusion trying to sort this out. In a side note, I've noticed 0.0.12 has odd behaviours. The DollarNeutral fails for me (e.g., #21), passing a dataframe or series to w_bench for a long only run with a benchmark doesn't work, etc. I really like the potential of this tool but I suspect cvxportfolio needs a much larger overhaul. |
The simplest way to correct the shape requirements is to improve the docstrings for all the methods and classes. Right now the docstrings are very sparse, and provide no guidance on the shapes of the input data for constructors of risks, costs, forecasts, etc. |
When running the HelloWorld example on macOS Catalina with a fresh download from the current repo with versions of the relevant libraries numpy=1.18.1, pandas=1.0.3, cvxpy=1.0.31, and python=3.7.7 on the cell
I get the following error
Any insight into what may be causing this would be much appreciated. Thank you!
The text was updated successfully, but these errors were encountered: