Is there a way to get cvxpy to generate a standard model file format (e.g. AMPL/GAMS/LP/MPS/NL) that can be submitted to NEOS Server?
This might be helpful: https://github.com/TrishGillett/pysdpt3glue
When using CPLEX as the solver you can use the cplex_filename option as described here.
Do I need to have CPLEX installed for this to work?
Do I need to have CPLEX installed for this to work?
Yes, it requires that the cplex package is installed. Note that the free Community Edition can be installed with pip install cplex, but this imposes a size limit on models. An unlocked version is available for free through the Academic Initiative.
Just for the sake of completeness, in MOSEK the option is called save_file.
IIUC, cvxpy has all the info (but maybe not the manpower) to generate one of these file formats itself without the need for an engine (since the solving will be done externally anyway).
@adishavit your understanding is correct. If someone wants to step up and volunteer to work on this, we can look at adding such a feature.
On the topic of file formats, the JuMP developers have a new file format (https://arxiv.org/abs/2002.03447). If anyone does get interested, better to target something existing.
From the paper:
... Much of this early history was dominated by a punch-card input format called MPS...
馃槄
Also

Re-opening this, because I think it would be a great feature for CVXPY to have. There are various degrees that such a feature could work. If someone wants to volunteer, I can offer some insights on similar issues I've faced in the past.
Does anyone know how to use sklearn models for prediction using cvxpy variables? I need this for MPC design. Indeed, my process has 10 states together with an input like x_i(t+1) = f_i(x_1(t),...,x_10(t),u(t)), and each f_i is a Random Forest. But I cannot use this in cvxpy as all x_i's and u are cvxpy variables.