-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feat): Linear GENOT #662
(feat): Linear GENOT #662
Conversation
* rename tag cost to cost_matrix * fix renaming * [CI skip], adapt callback * incorporate requested changes * add test for quad custom callback * adapt kwargs for callback * fix handle_joint_attr * incorporate requested changes
* fix test in FGWProblem * add correlation test * add first test for correlation computation * add more tests * fix tests * add tfs to compute_feature_correlation * add testing for no nans in compute_feature_correlation * incorporate requested changes * fix docstring
* fix sankey return statement * adapt test * adapt return_fig
* fix return type in mpl * change import acronyms * fix tests
* Simplify linear operator * Simplify `align`, fix test
* fix return type in mpl * change import acronyms * fix tests * add interpolation option to sankey * add test to interpolate color * define colors for pull/push` * adapt tests * introduce axes in mpl.push/pull * incorporate requested changes * change default color * adapt plotting * introduce scaling * fix scale * make start/end categorical in plot * regenerate images
* fix bug in SinkhornProblem * fix tox.ini
* make push/pull always use source/target * fix bug in StarPolicy _apply * adapt plotting to source/target
* fix strip plotting in sankey * simplify code
* add spearman correlation * add tests * adapt tests
* make push/pull plot in good order * [CI skip], try setting adata.uns color explicitly * [CI skip], fix copying of adata * fix pre commits * fix bug
…pe of `temporal_key` (#449) * make marginal_kwargs explicit in temporal problems * introduce check for numeric dtype in temporal mixin * add alternative way for marginal prior * adapt tolerances in tests * correct docs * fix bug * Fix math rendering * fix test Co-authored-by: Michal Klein <46717574+michalk8@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ilan-gold .
Maybe let's do the few changes I suggested, and then next week I'll go over it with @selmanozleyen as well.
ok @MUCDK ! |
@MUCDK do you think GENOT code in ottjax is final? My version in my thesis project is very different from the one in ottjax . If you like maybe we can first discuss possible changes there. Depends on what you want to prioritize. |
Yeah it's not super final but I wouuld prefer to have the merges more incremental as we have been workin gon this PR for almost 2 years. Let's talk next week in person. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file left empty intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a TODO comment instead of leaving empty might be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can delete this file
src/moscot/problems/time/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this might be nitpicking but I am just curious if there is a reason for this change
# see: https://github.com/numpy/numpydoc/issues/275 | ||
("py:class", "None. Remove all items from D."), | ||
("py:class", "a set-like object providing a view on D's items"), | ||
("py:class", "a set-like object providing a view on D's keys"), | ||
("py:class", "v, remove specified key and return the corresponding value."), # noqa: E501 | ||
("py:class", "None. Update D from dict/iterable E and F."), | ||
("py:class", "an object providing a view on D's values"), | ||
("py:class", "a shallow copy of D"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what these mean. Is this intentional or was it left from debugging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are warnings from the RTD that should be ignored base on the static class rendering file. But they are indeed too many I'm not sure if it's wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, what to do here. We can't import from MutableMapping
for DistributionCollection
without re-implementing all the abstract methods, which seems like a waste. The other option would be to remove the DistributionCollection
class since it is used only for repr
/cleanness of API. @MUCDK this code was pulled from your starting point, so perhaps you can chime in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be fine with keeping it as it is if it's not too much of an issue. @selmanozleyen wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If typing.Dict doesn't work as well I guess using those ignores is a better solution than re-implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ilan-gold I made some comments. If it passes the relevant tests and docs seem good that's enough for me. But one very important thing is the conflict in the files.
Greatl, let's wait for @ilan-gold 's response, and then merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
We add two main new classes here:
GENOTLinSolver
wraps the underlying OTT-Jax solver in a moscot-usable wayGENOTLinProblem
at the next level of abstraction up, allowing users to work withAnnData
objects directly while also using other parts of the moscot API like policiesTo run this PR, simply do
pip install -e .
as it points directly at the corresponding OTT-JAX branch.TODOs: