comp-imaging / ProxImaL

A domain-specific language for image optimization.
MIT License
112 stars 29 forks source link

test_prox_fn tests cvxpy components #15

Closed adler-j closed 8 years ago

adler-j commented 8 years ago

Currently in test_prox_fn the following line is run (among others):

x_var = cvx.Variable(10)

I assume that this is a copy-paste error and that the test should be for proximal.Variable? Otherwise these need to be import guarded since cvxpy is not a required dependency of proximal and not having it currently causes the tests to crash.

SteveDiamond commented 8 years ago

No, this is intentional. cvxpy is a required dependency for running the tests. This is mentioned (a bit obscurely) in the installation instructions. It's much easier to write the tests with a gold standard convex solver to compare against. I know you guys use windows and installing cvxpy on windows is a bit of a pain, but I'm working on this and very soon cvxpy installation will be extremely easy on all platforms.

SteveDiamond commented 8 years ago

Hmm, I see what you mean now. You're suggesting making a subset of the tests work without cvxpy, like how a subset runs without halide right now? I need to think about that.

adler-j commented 8 years ago

No, this is intentional. cvxpy is a required dependency for running the tests. This is mentioned (a bit obscurely) in the installation instructions. It's much easier to write the tests with a gold standard convex

Sure makes sense to have a gold standard, but you really need to be vary that cvx could also be wrong (since you use similar algorithms etc). You just make sure to run as many tests as possible with a known optimal result.

Hmm, I see what you mean now. You're suggesting making a subset of the tests work without cvxpy, like how a subset runs without halide right now? I need to think about that.

Yes, that's exactly what I mean.

I know you guys use windows and installing cvxpy on windows is a bit of a pain, but I'm working on this and very soon cvxpy installation will be extremely easy on all platforms.

Great! For windows, a conda package would be great. But windows is just me running on my laptop (since I'm officially on vacation right now).

SteveDiamond commented 8 years ago

cvxpy actually uses quite different algorithms (that solve to much higher accuracy). So it really is a gold standard. I'm going to keep it as a required dependency for the tests.