Closed selmanozleyen closed 1 month ago
Attention: Patch coverage is 57.14286%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 87.81%. Comparing base (
aa33bd9
) to head (88bde47
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
src/ott/solvers/was_solver.py | 57.14% | 2 Missing and 1 partial :warning: |
thanks @selmanozleyen for the PR! i will defer to @michalk8 on this, but it feels that if we implement this for this particular solver, we would need to implement it for all solvers, no? What was the use case that revealed the problem?
For linear solvers there is no need as their base class Sinkhorn
doesn't take kwargs
. Since WassersteinSolver now handles unrecognized kwargs
, all it's child classes will also handle it (since all child classes pass remaining kwargs to super()__init__()
).
In moscot we don't want to ignore any unrecognized arguments since there are many arguments, and with some typo etc. it can lead to some well hidden bugs.
Here is the PR for it:https://github.com/theislab/moscot/pull/748
We use many (if not all) solvers in our case and from my tests this PR should be enough to cover the constructors for linear and quadratic solvers. I am not sure about other methods such as solve
in ottjax
though.
@michalk8 since the interface is going to change I think it would be better if you did it. I already resolved other pre-commit and formatting issues you mentioned
@michalk8 since the interface is going to change I think it would be better if you did it. I already resolved other pre-commit and formatting issues you mentioned
Ok, thanks! I will then close this PR and open tomorrow a new one.
hi @michalk8, just wanted to remind you on this. I think many test cases and stuff might have to change since the API also changes. So maybe I can help a bit
hi,
A user can give an argument by typo or any other misunderstanding and the solver class would work without them noticing. To prevent such cases I made some modifications. I also added tests that asserts that the raises are thrown properly.
Note: I am not sure about why the linting fails, it
tox -e lint-code
passes locally for me. Note: I also modified the caching in CI's because it didn't work on my pr for some reasonRelated: https://github.com/theislab/moscot/pull/748
ping: @MUCDK