Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d62877b
Add entropic_partial_wasserstein function
pnavaro Jan 21, 2025
90877fa
Update lib.jl
pnavaro Jan 21, 2025
f080ec7
Add partial_wasserstein2 function and export
pnavaro Nov 21, 2025
984f0ce
Update Project.toml
pnavaro Nov 21, 2025
e569c66
Add partial_wasserstein function to API
pnavaro Nov 21, 2025
e285ca3
Add entropic_partial_gromov_wasserstein2 function
pnavaro Nov 26, 2025
8d7b1c6
Add entropic_partial_gromov_wasserstein function
pnavaro Nov 26, 2025
90aa8c7
Expand and reorganize POT wrappers
pnavaro Nov 25, 2026
f1a0fa2
Update Project.toml
pnavaro Nov 25, 2026
1f9a21d
Move partial Gromov wrappers to ot.gromov
pnavaro Nov 25, 2026
b6ec776
Merge pull request #7 from pnavaro/pnavaro-wrap-missing-pot-functions
pnavaro Nov 25, 2026
13f26bd
Require Julia 1.10 and adopt Dependabot
pnavaro Nov 25, 2026
28cae83
Merge pull request #8 from pnavaro/pnavaro-wrap-missing-pot-functions
pnavaro Nov 25, 2026
6639880
Expand and organize transport wrapper tests
pnavaro Nov 25, 2026
df5d1d0
Merge branch 'pnavaro-wrap-missing-pot-functions'
pnavaro Nov 25, 2026
db00172
Run Julia CI on macOS ARM64
pnavaro Nov 25, 2026
7210f62
Merge branch 'pnavaro-wrap-missing-pot-functions'
pnavaro Nov 25, 2026
3f22944
Make barycenter doctests deterministic
pnavaro Nov 25, 2026
d0d7f5d
Merge branch 'pnavaro-wrap-missing-pot-functions'
pnavaro Nov 25, 2026
72dde85
Format Julia test files
pnavaro Nov 25, 2026
6181358
Update GitHub Actions versions
pnavaro Nov 25, 2026
addbd27
Merge branch 'pnavaro-wrap-missing-pot-functions'
pnavaro Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ updates:
schedule:
interval: monthly
open-pull-requests-limit: 99
- package-ecosystem: julia
directories:
- /
- /docs
- /test
schedule:
interval: weekly
open-pull-requests-limit: 99
24 changes: 13 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,29 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1.6'
- '1.10'
- '1'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- arm64
exclude:
# Conda installation fails: https://github.com/JuliaPy/Conda.jl/issues/230
- version: '1.0'
os: windows-latest
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
- os: macOS-latest
arch: x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/cache@v3
with:
cache-packages: "false" # Weird interaction with PyCall settings?
- uses: julia-actions/julia-buildpkg@v1
Expand All @@ -61,12 +63,12 @@ jobs:
shell: julia --project=. --color=yes {0}
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v7
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: coverallsapp/github-action@master
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
Expand All @@ -77,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
16 changes: 0 additions & 16 deletions .github/workflows/CompatHelper.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/julia-docdeploy@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DocsPreviewCleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
ref: gh-pages
- name: Delete preview and history + push changes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: 1
- name: Install JuliaFormatter and format code
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/JuliaNightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,32 @@ jobs:
- windows-latest
arch:
- x64
- arm64
exclude:
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
- os: macOS-latest
arch: x64
python:
- ''
- python
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Install python
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: '3.x'
architecture: ${{ matrix.arch }}
if: matrix.python
- run: python -m pip install pot
if: matrix.python
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/cache@v3
with:
cache-packages: "false" # Weird interaction with PyCall settings?
- uses: julia-actions/julia-buildpkg@v1
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name = "PythonOT"
uuid = "3c485715-4278-42b2-9b5f-8f00e43c12ef"
authors = ["David Widmann"]
version = "0.1.6"
version = "0.1.7"

[deps]
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"

[compat]
PyCall = "1"
julia = "1"
julia = "1.10"

[extras]
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Expand Down
76 changes: 76 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ emd
emd2
emd_1d
emd2_1d
wasserstein_1d
wasserstein_circle
binary_search_circle
linear_circular_ot
free_support_barycenter
barycenter_debiased
convolutional_barycenter2d
sinkhorn_log
sinkhorn_stabilized
sinkhorn_epsilon_scaling
greenkhorn
screenkhorn
empirical_sinkhorn
empirical_sinkhorn2
```

## Regularized optimal transport
Expand All @@ -27,6 +41,7 @@ using PythonOT.Smooth

```@docs
PythonOT.Smooth.smooth_ot_dual
PythonOT.Smooth.smooth_ot_semi_dual
```

## Unbalanced optimal transport
Expand All @@ -36,4 +51,65 @@ sinkhorn_unbalanced
sinkhorn_unbalanced2
barycenter_unbalanced
mm_unbalanced
mm_unbalanced2
sinkhorn_unbalanced_translation_invariant
lbfgsb_unbalanced
lbfgsb_unbalanced2
uot_1d
```

## Partial optimal transport

```@docs
entropic_partial_wasserstein
partial_wasserstein
partial_wasserstein2
partial_wasserstein_lagrange
```

## Gromov-Wasserstein

```@docs
gromov_wasserstein
gromov_wasserstein2
entropic_gromov_wasserstein
entropic_gromov_wasserstein2
fused_gromov_wasserstein
fused_gromov_wasserstein2
entropic_fused_gromov_wasserstein
semirelaxed_gromov_wasserstein
partial_gromov_wasserstein
partial_gromov_wasserstein2
entropic_partial_gromov_wasserstein
entropic_partial_gromov_wasserstein2
gromov_barycenters
fgw_barycenters
```

## Sliced optimal transport

```@docs
sliced_wasserstein_distance
max_sliced_wasserstein_distance
sliced_wasserstein_sphere
PythonOT.get_random_projections
```

## Domain adaptation

```@docs
emd_laplace
sinkhorn_l1l2_gl
sinkhorn_lpl1_mm
```

## Utilities and generic solvers

These helpers are not exported; call them as `PythonOT.dist`, etc.

```@docs
PythonOT.dist
PythonOT.unif
PythonOT.solve
PythonOT.solve_sample
```
54 changes: 51 additions & 3 deletions src/PythonOT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,63 @@ export emd,
sinkhorn_unbalanced,
sinkhorn_unbalanced2,
empirical_sinkhorn_divergence,
mm_unbalanced
mm_unbalanced,
entropic_partial_wasserstein,
entropic_partial_gromov_wasserstein,
entropic_partial_gromov_wasserstein2,
partial_wasserstein,
partial_wasserstein2,
gromov_wasserstein,
entropic_gromov_wasserstein,
partial_wasserstein_lagrange,
partial_gromov_wasserstein,
partial_gromov_wasserstein2,
wasserstein_1d,
wasserstein_circle,
binary_search_circle,
linear_circular_ot,
free_support_barycenter,
sinkhorn_log,
sinkhorn_stabilized,
sinkhorn_epsilon_scaling,
greenkhorn,
screenkhorn,
empirical_sinkhorn,
empirical_sinkhorn2,
barycenter_debiased,
convolutional_barycenter2d,
mm_unbalanced2,
sinkhorn_unbalanced_translation_invariant,
lbfgsb_unbalanced,
lbfgsb_unbalanced2,
uot_1d,
gromov_wasserstein2,
entropic_gromov_wasserstein2,
fused_gromov_wasserstein,
fused_gromov_wasserstein2,
entropic_fused_gromov_wasserstein,
semirelaxed_gromov_wasserstein,
gromov_barycenters,
fgw_barycenters,
sliced_wasserstein_distance,
max_sliced_wasserstein_distance,
sliced_wasserstein_sphere,
emd_laplace,
sinkhorn_l1l2_gl,
sinkhorn_lpl1_mm

const pot = PyCall.PyNULL()

include("lib.jl")
for f in ("lp", "bregman", "unbalanced", "partial", "gromov", "sliced", "da", "utils")
include(f * ".jl")
end
include("smooth.jl")

function __init__()
return copy!(pot, PyCall.pyimport_conda("ot", "pot", "conda-forge"))
copy!(pot, PyCall.pyimport_conda("ot", "pot", "conda-forge"))
# SciPy warns about the unused `disp` option that POT passes to `minimize`
PyCall.pyimport("warnings").filterwarnings("ignore"; message="Unknown solver options")
return nothing
end

end
Loading
Loading