Recursion error on selective machines

27 views
Skip to first unread message

Henry Wang

unread,
Feb 21, 2021, 8:23:54 PM2/21/21
to cvxpy
Hi!

I've got a DGP problem which runs well on my local machine. However, when I transpose it to a computing node, I run into "RecursionError: maximum recursion depth exceeded while calling a Python object".

The issue here is that I need to embed the this optimization solver within an ML framework on GPU, and my local machine does not have a GPU (or any fast way to perform gradient descent).

I saw the response on "https://groups.google.com/g/cvxpy/c/btQuh4FsQ-I", however this solution didn't work for me. Specifically, *variable was returning a TypeError.

For more info: 
local machine - core i5-6200U; 8 GB RAM
node - intel xeon gold 6142; 16 GB RAM

Thank you!
Henry


Steven Diamond

unread,
Feb 23, 2021, 9:21:16 PM2/23/21
to cvxpy
I don't have a good answer, sorry. Are you using cvxpylayers? You could post an issue on their github: https://github.com/cvxgrp/cvxpylayers

Henry Wang

unread,
Feb 26, 2021, 10:04:41 PM2/26/21
to cvxpy
Hi Steven,

Thanks for the tip. This looks pretty cool - I actually wasn't aware of cvxpylayers before, and it looks useful.

I ended up implementing a fix by Harris Teague who suggested to just increase the max recursive iterations via 
"import sys
sys.setrecursionlimit(10000)".

Best,
Henry

Reply all
Reply to author
Forward
0 new messages