summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-12[FEAT] Entropic gw/fgw/srgw/srfgw solvers (#455)upstream/latestCédric Vincent-Cuaz
* add entropic fgw + fgw bary + srgw + srfgw with tests * add exemples for entropic srgw - srfgw solvers * add PPA solvers for GW/FGW + complete previous commits * update readme * add tests * add examples + tests + warning in entropic solvers + releases * reduce testing runtimes for test_gromov * fix conflicts * optional marginals * improve coverage * gromov doc harmonization * fix pep8 * complete optional marginal for entropic srfgw --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-06-12[FEAT] Alpha differentiability in semirelaxed_gromov_wasserstein2 (#483)SoniaMazelet
* alpha differentiable * autopep and update gradient test * debug test gradient --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-06-12[FIX] remove CUDA test on push to master (#485)Rémi Flamary
CUDA test runner is not always available for energy reasons and should not be requires for all push to master.
2023-06-09[MRG] Update tests and documentation (#484)Rémi Flamary
* remove old macos and windows tets update requirements * speedup ssw and continuaous ot exmaples * speedup regpath and variane * speedup conv 2d example + continuous stick * speedup regpath
2023-05-11[DOC] Fix references to JAX and numpy functions (#475)Oleksii Kachaiev
* Fix ref to JAX * Fix references to numpy.random.* * Typo in CONTRIBUTING * Removed :any: reference from func parameters * Make markup of params consistent with other docstrings * Mentioned latest open PR in RELEASES * Fix See Also references for ot.factored --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-05-10[FIX] Refactor the function `utils.cost_normalization` to work with multiple ↵Francisco Muñoz
backends (#472) * [FEAT] Add the 'median' method to the backend base class and implements this method in the Numpy, Pytorch, Jax and Cupy backends * [TEST] Modify the 'cost_normalization' test to multiple backends * [REFACTOR] Refactor the 'utils.cost_normalization' function for multiple backends * [TEST] Update backend tests for method 'median' * [DEBUG] Fix the error in the test in the 'median' method with PyTorch backend * [TEST] Add the edge case where the 'median' method is not yet implemented in the Tensorflow backend. * [FEAT] Implement the 'median' method in the Tensorflow backend using Numpy * [DEBUG] For compatibility reasons, the median method in the Pytorch backend change using numpy * [DEBUG] The 'median' method checks the Pytorch version to decide whether to use torch.quantile or numpy * Add changes to RELEASES.md --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-05-08[MRG] Fix barycenter_stabilized with PyTorch and log set to True (#474)Oleksii Kachaiev
* np -> nx for stabilized barycenters log * Mention fix in RELEASES
2023-05-05fix condition cuda testsRémi Flamary
2023-05-05[MRG] Add github action test cuda (#473)Rémi Flamary
* add workflow cuda * try with conda * try again conda * and now? * proper python version * cleanup * try to use proper python * again? * cleanup stuff and use python3.10 * remove dr test * remove docstrng tetss for stoc methods * add condition for cuda tests * remove unused files * upate release file * debug workflow
2023-05-05[MRG] Fix bug SSW backend (#471)Clément Bonet
* fix bug np vs torch matmul * typo error * einsum projections ssw * Test broadcast matmul * einsum projections ssw * Test broadcast matmul * projections SSW with einsum * reduce number of samples in test wasserstein_circle_unif * Update releases.md --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-05-04Improve Bures-Wasserstein distance (#468)François Rozet
* Improve Bures-Wasserstein distance * Revert changes and modify sqrtm * Fix typo * Add changes to RELEASES.md --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-05-03[DOC] Corrected spelling errors (#467)Oleksii Kachaiev
* Fix typos in docstrings and examples * A few more fixes * Fix ref for `center_ot_dual` function * Another typo * Fix titles formatting * Explicit empty line after math blocks * Typo: asymmetric * Fix code cell formatting for 1D barycenters * Empirical * Fix indentation for references * Fixed all WARNINGs about title formatting * Fix empty lines after math blocks * Fix whitespace line * Update changelog * Consistent Gromov-Wasserstein * More Gromov-Wasserstein consistency --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-05-02Perform zero_grad after each batch (#466)Oleksii Kachaiev
2023-04-25[FEAT] add the sparsity-constrained optimal transport funtionality and ↵Tianlin Liu
example (#459) * add sparsity-constrained ot funtionality and example * correct typos; add projection_sparse_simplex * add gradcheck; merge ot.sparse into ot.smooth. * reuse existing ot.smooth functions with a new 'sparsity_constrained' reg_type * address pep8 error * add backends for * update releases --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-04-24[MRG] make alpha parameter in FGW diferentiable (#463)Rémi Flamary
* make alpha diferentiable * update release file * debug tensorflow to_numpy
2023-04-24Typo in the title of OT_L1_vs_L2 (#462)Oleksii Kachaiev
2023-04-18[MRG] Fix Bug binary_search_circle on GPU and Gradients (#457)Clément Bonet
* W circle + SSW * Tests + Example SSW_1 * Example Wasserstein Circle + Tests * Wasserstein on the circle wrt Unif * Example SSW unif * pep8 * np.linalg.qr for numpy < 1.22 by batch + add python3.11 to tests * np qr * rm test python 3.11 * update names, tests, backend transpose * Comment error batchs * semidiscrete_wasserstein2_unif_circle example * torch permute method instead of torch.permute for previous versions * update comments and doc * doc wasserstein circle model as [0,1[ * Added ot.utils.get_coordinate_circle to get coordinates on the circle in turn * Bug cuda w_circle + gradient ssw * Bug cuda w_circle + gradient ssw * backend detach * Add PR in Releases.md --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-04-18Proper condition for redirector actionRémi Flamary
2023-04-18add if to circleci_redirectorRémi Flamary
2023-04-18debug circleci_redirectorRémi Flamary
2023-04-17[MRG] Fix circleci_redirector and codecov (#460)Rémi Flamary
* Try circleci_redirector fix * reùove fixed version pytest-cov * use new codecov way to upload * bad return * proper pr in release fle
2023-04-07[MRG] debug documentation (#453)Rémi Flamary
2023-04-07[MRG] Release 0.9.0 (#452)Rémi Flamary
* relkase text * correct typos
2023-03-24[MRG] Remove copy of hidden folder in doc deploy (#450)Rémi Flamary
* cleanup deploy and remove hidden folder
2023-03-24[WIP] Build donc in GH Action and report warnings + move contributing and ↵Rémi Flamary
code of conduct in documentation (#441) * use action for doc with wraning visible * remove space * remove space again * test pre commands * install pot properly * install compiler... * try composite action * remoe warning in sliced exmaple * pep8 * move contributing and code of conduct * cleanup * underline too short * update quickstart * replace version selector by static list to avoid jsQuery bug
2023-03-22[MRG] CO-Optimal Transport solver (#447)Huy Tran
* Allow warmstart in sinkhorn and sinkhorn_log * Added argument for warmstart of dual vectors in Sinkhorn-based methods in * Add the number of the PR * [WIP] CO-Optimal Transport * Revert "[WIP] CO-Optimal Transport" This reverts commit f3d36b2705013409ac69b346585e311bc25fcfb7. * reformat with PEP8 * Fix W291 trailing whitespace error in pep8 test * Rearange position of warmstart argument and edit its description * Implementation of CO-Optimal Transport * Optimize code and edit documentation * fix backend bug in test cases * fix backend bug * fix backend bug * Add examples on COOT * Modify API and edit example * Edit API * minor edit of examples and release * fix bug in coot * fix doc examples * more fix of doc * restart CI * reordering ref * add more tests * add more tests * add test verbose * fix PEP8 bug * fix PEP8 bug * fix PEP8 bug * fix pytest bug * edit doc for better display --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com> Co-authored-by: Alexandre Gramfort <agramfort@fb.com>
2023-03-21[MRG] Make partial_wasserstein, partial_wasserstein2 and ↵Antoine Collas
entropic_partial_wasserstein work with backend (#449) * add test of partial_wasserstein with torch tensors * WIP: differentiable ot.partial.partial_wasserstein * change test of torch partial * make partial_wasserstein2 work with torch * test backward through ot.partial.partial_wasserstein2 * add test of entropic_partial_wasserstein with torch tensors * make entropic_partial_wasserstein work with torch tensors * add test of backward through entropic_partial_wasserstein * rm unused import * test partial_wasserstein with all backends * tests of partial fcts: check if torch is available * partial: check if marginals are empty arrays * add tests when marginals are empty arrays and/or m=None * add PR to RELEASES.md --------- Co-authored-by: Antoine Collas <22830806+antoinecollas@users.noreply.github.com> Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-03-21[MRG] Remove redundant abs() (#448)Lin Hsu
* Remove redundant abs() * Update RELEASES.md
2023-03-16[MRG] fix bugs of gw_entropic and armijo to run on gpu (#446)Cédric Vincent-Cuaz
* maj gw/ srgw/ generic cg solver * correct pep8 on current state * fix bug previous tests * fix pep8 * fix bug srGW constC in loss and gradient * fix doc html * fix doc html * start updating test_optim.py * update tests gromov and optim - plus fix gromov dependencies * add symmetry feature to entropic gw * add symmetry feature to entropic gw * add exemple for sr(F)GW matchings * small stuff * remove (reg,M) from line-search/ complete srgw tests with backend * remove backend repetitions / rename fG to costG/ fix innerlog to True * fix pep8 * take comments into account / new nx parameters still to test * factor (f)gw2 + test new backend parameters in ot.gromov + harmonize stopping criterions * split gromov.py in ot/gromov/ + update test_gromov with helper_backend functions * manual documentaion gromov * remove circular autosummary * trying stuff * debug documentation * alphabetic ordering of module * merge into branch * add note in entropic gw solvers * fix exemples/gromov doc * add fixed issue to releases.md * fix bugs of gw_entropic and armijo to run on gpu * add pr to releases.md * fix pep8 * fix call to backend in line_search_armijo * correct docstring generic_conditional_gradient --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-03-10[WIP] Fix gromov examples gallery (#444)Cédric Vincent-Cuaz
* maj gw/ srgw/ generic cg solver * correct pep8 on current state * fix bug previous tests * fix pep8 * fix bug srGW constC in loss and gradient * fix doc html * fix doc html * start updating test_optim.py * update tests gromov and optim - plus fix gromov dependencies * add symmetry feature to entropic gw * add symmetry feature to entropic gw * add exemple for sr(F)GW matchings * small stuff * remove (reg,M) from line-search/ complete srgw tests with backend * remove backend repetitions / rename fG to costG/ fix innerlog to True * fix pep8 * take comments into account / new nx parameters still to test * factor (f)gw2 + test new backend parameters in ot.gromov + harmonize stopping criterions * split gromov.py in ot/gromov/ + update test_gromov with helper_backend functions * manual documentaion gromov * remove circular autosummary * trying stuff * debug documentation * alphabetic ordering of module * merge into branch * add note in entropic gw solvers * fix exemples/gromov doc * add fixed issue to releases.md --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-03-09[MRG] Semi-relaxed (fused) gromov-wasserstein divergence and improvements of ↵Cédric Vincent-Cuaz
gromov-wasserstein solvers (#431) * maj gw/ srgw/ generic cg solver * correct pep8 on current state * fix bug previous tests * fix pep8 * fix bug srGW constC in loss and gradient * fix doc html * fix doc html * start updating test_optim.py * update tests gromov and optim - plus fix gromov dependencies * add symmetry feature to entropic gw * add symmetry feature to entropic gw * add exemple for sr(F)GW matchings * small stuff * remove (reg,M) from line-search/ complete srgw tests with backend * remove backend repetitions / rename fG to costG/ fix innerlog to True * fix pep8 * take comments into account / new nx parameters still to test * factor (f)gw2 + test new backend parameters in ot.gromov + harmonize stopping criterions * split gromov.py in ot/gromov/ + update test_gromov with helper_backend functions * manual documentaion gromov * remove circular autosummary * trying stuff * debug documentation * alphabetic ordering of module * merge into branch * add note in entropic gw solvers --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-03-09[MRG] Update pymanopt requirement and API for `ot.dr` (#443)Rémi Flamary
* updayte pymanopt API step 1 * add realease information * update requireents for tests on windows
2023-02-28[MRG] Add method argument to sinkhorn Transport (#440)tgnassou
* add method argument to sinkhron transport' * update release
2023-02-23[MRG] Added argument for warmstart of dual vectors in Sinkhorn-based methods ↵Huy Tran
in `ot.bregman` (#437) * Allow warmstart in sinkhorn and sinkhorn_log * Added argument for warmstart of dual vectors in Sinkhorn-based methods in * Add the number of the PR * [WIP] CO-Optimal Transport * Revert "[WIP] CO-Optimal Transport" This reverts commit f3d36b2705013409ac69b346585e311bc25fcfb7. * reformat with PEP8 * Fix W291 trailing whitespace error in pep8 test * Rearange position of warmstart argument and edit its description --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-02-23[WIP] Wasserstein distance on the circle and Spherical Sliced-Wasserstein (#434)Clément Bonet
* W circle + SSW * Tests + Example SSW_1 * Example Wasserstein Circle + Tests * Wasserstein on the circle wrt Unif * Example SSW unif * pep8 * np.linalg.qr for numpy < 1.22 by batch + add python3.11 to tests * np qr * rm test python 3.11 * update names, tests, backend transpose * Comment error batchs * semidiscrete_wasserstein2_unif_circle example * torch permute method instead of torch.permute for previous versions * update comments and doc * doc wasserstein circle model as [0,1[ * Added ot.utils.get_coordinate_circle to get coordinates on the circle in turn
2023-01-16[MRG] OT for Gaussian distributions (#428)tgnassou
* add gaussian modules * add gaussian modules * add PR to release.md * Apply suggestions from code review Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> * Apply suggestions from code review Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> * Update ot/gaussian.py * Update ot/gaussian.py * add empirical bures wassertsein distance, fix docstring and test * update to fit with new networkx API * add test for jax et tf" * fix test * fix test? * add empirical_bures_wasserstein_mapping * fix docs * fix doc * fix docstring * add tgnassou to contributors * add more coverage for gaussian.py * add deprecated function * fix doc math" " * fix doc math" " * add remi flamary to authors of gaussiansmodule * fix equation Co-authored-by: Rémi Flamary <remi.flamary@gmail.com> Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
2022-12-23[MRG] Fix warning bug in sinkhorn2 (#417)arincbulgur
* Pass warn argument downstream in sinkhorn2 method. * releases.md * Fix unittest. Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2022-12-21[MRG] Fix#421 pass stopThr to the sinkhorn function in ↵Théo Lacombe
empirical_sinkhorn_divergence (#422) * fix stopThr hardcoded in some places * added fix documentation in RELEASES.Md Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2022-12-20[MRG] Change Doc empirical_sinkhorn_div to reflect what is computed (#423)Théo Lacombe
* Changes empirical_sinkhorn_divergence doc to mention that the entroipc term is not taken into account. * change typo regularization->contribution Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2022-12-20[MRG] Gromov barycenter example bug (#425)Nathan Cassereau
* bug solve * releases.md
2022-12-16[MRG] Change the number of projection to match the predefined case (#419)Titouan Vayer
2022-12-15[MRG] New API for OT solver (with pre-computed ground cost matrix) (#388)Rémi Flamary
* new API for OT solver * use itertools for product of parameters * add tests for result class * add tests for result class * add tests for result class last time? * add sinkhorn * make partial OT bckend compatible * add TV as unbalanced flavor * better tests * make smoth backend compatible and add l2 tregularizatio to solve * add reularizedd unbalanced * add test for more complex attibutes * add test for more complex attibutes * add generic unbalaned solver and implement it for ot.solve * add entropy to possible regularization * star of documentation for ot.solv * weird new pep8 * documenttaion for function ot.solve done * pep8 * Update ot/solvers.py Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> * update release file * Apply suggestions from code review Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> * add test NotImplemented * pep8 * pep8gcmp pep8! * compute kl in backend * debug tensorflow kl backend Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
2022-12-06[MRG] Fix bug in regularized OTDA l1lp with log (#413)Rémi Flamary
* correct bug in DA l1lp with log * better tests and speedup with smaller dataset size * remove jax for log test * remove trndorflow for log test * pep8!
2022-12-03[MRG] Wrong documentation in weak OT solver (#410)Nathan Cassereau
* Docstrings of weak.py updated * releases.md
2022-11-21[MRG] Replaces numpy compiler with setuptools (#409)Nathan Cassereau
* Numpy ccompiler deprecation handled with setuptools ccompiler * Remove useless OMP Macro, already provides _OPENMP * RELEASES.md * Remove forgotten temporary bug added for logging purposes
2022-09-27[MRG] Crash when computing weightless Hamming distance & Doc build (#402)Nathan Cassereau
* Bug solve * Releases.md updated * pep8 * attempt to solve docs building bug * releases.md
2022-09-12update docstring of ot.gromov.init_matrix (#398)decarpentierg
Co-authored-by: Gonzague de Carpentier <decarpentierg@gmail.com>
2022-08-18[MRG] Proper subsections in gallery (#395)Rémi Flamary
* add option for preper subsections * cleanup dodecov ignore * cleanup dodecov ignore
2022-08-17[MRG] Debug sinkhorn divergence bug and add proper test (#394)Rémi Flamary
* skip tets if not torch installed * update release.md
2022-08-17debug sinkhorn divergence gradientsRémi Flamary