Skip to content

Commit

Permalink
add test for max_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniaMaz8 committed Nov 19, 2024
1 parent 2bf5900 commit cabb104
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def test_solve_last_step():
assert not torch.allclose(ga0 - ga0.mean(), ga - ga.mean())
assert not torch.allclose(gb0 - gb0.mean(), gb - gb.mean())

with pytest.raises(ValueError):
ot.solve(M, a, b, grad="last_step", max_iter=0, reg=10)


@pytest.mark.skipif(not torch, reason="torch no installed")
def test_solve_envelope():
Expand Down

0 comments on commit cabb104

Please sign in to comment.