Skip to content

Commit 030f50b

Browse files
authored
Merge branch 'master' into sgot_update
2 parents 6e0bc73 + 5a0f496 commit 030f50b

46 files changed

Lines changed: 5746 additions & 2817 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ jobs:
5151
command: |
5252
python -m pip install --user --upgrade --progress-bar off pip
5353
python -m pip install --user -e .
54-
python -m pip install --user --upgrade --no-cache-dir --progress-bar off -r requirements_all.txt
5554
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
5655
python -m pip install --user --upgrade --progress-bar off ipython sphinx-gallery memory_profiler
5756
# python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ numpy>=1.20
22
scipy>=1.6
33
matplotlib
44
autograd
5-
pymanopt @ git+https://github.com/pymanopt/pymanopt.git@master
5+
pymanopt
66
cvxopt
77
scikit-learn
8-
torch<=2.11
8+
torch<2.12
99
jax
1010
jaxlib
1111
tensorflow; python_version < '3.14'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
numpy>=1.20
2+
scipy>=1.6
3+
matplotlib
4+
autograd
5+
pymanopt
6+
cvxopt
7+
scikit-learn
8+
pytest
9+
cvxpy

.github/workflows/build_doc.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ on:
55
pull_request:
66
push:
77
branches:
8-
- 'master'
8+
- 'master'
99

1010
jobs:
1111
build:
1212

1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v7
1717
with:
1818
submodules: true
1919
# Standard drop-in approach that should work for most people.
@@ -31,7 +31,6 @@ jobs:
3131
- name: Get Python running
3232
run: |
3333
python -m pip install --user --upgrade --progress-bar off pip
34-
python -m pip install --user --upgrade --progress-bar off -r requirements_all.txt
3534
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
3635
python -m pip install --user --upgrade --progress-bar off ipython sphinx-gallery memory_profiler
3736
python -m pip install -v --user -e .
@@ -45,7 +44,7 @@ jobs:
4544
uses: rickstaa/sphinx-action@master
4645
with:
4746
docs-folder: "docs/"
48-
- uses: actions/upload-artifact@v4
47+
- uses: actions/upload-artifact@v7
4948
with:
5049
name: Documentation
5150
path: docs/build/html/

.github/workflows/build_tests.yml

Lines changed: 148 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
tags:
1515
- '**'
1616

17+
env:
18+
PY_VERSION: "3.13"
19+
1720
jobs:
1821

1922
Lint:
@@ -27,13 +30,13 @@ jobs:
2730

2831

2932
- name: Checking Out Repository
30-
uses: actions/checkout@v4
33+
uses: actions/checkout@v7
3134
with:
3235
submodules: true
3336
# Install Python & Packages
3437
- uses: actions/setup-python@v6
3538
with:
36-
python-version: "3.14"
39+
python-version: ${{ env.PY_VERSION }}
3740
- run: which python
3841
- name: Lint with pre-commit
3942
run: |
@@ -44,37 +47,92 @@ jobs:
4447
build_from_source:
4548
runs-on: ubuntu-latest
4649
steps:
47-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@v7
4851
with:
4952
submodules: true
5053

5154
- name: Set up Python
52-
uses: actions/setup-python@v5
55+
uses: actions/setup-python@v6
5356
with:
54-
python-version: "3.14"
57+
python-version: ${{ env.PY_VERSION }}
5558
- name: Build from source
5659
run: |
5760
python -m pip install --upgrade pip setuptools wheel
5861
python -m pip install cython numpy
5962
python setup.py sdist bdist_wheel
6063
pip install dist/*.tar.gz
6164
62-
linux:
65+
doctests:
6366

6467
runs-on: ubuntu-latest
6568
if: "!contains(github.event.head_commit.message, 'no ci')"
66-
strategy:
67-
max-parallel: 4
68-
matrix:
69-
python-version: ["3.11", "3.12", "3.13", "3.14"]
70-
7169
steps:
7270
- name: Free Disk Space (Ubuntu)
7371
uses: insightsengineering/disk-space-reclaimer@v1
7472
with:
7573
android: true
7674
dotnet: true
77-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@v7
76+
with:
77+
submodules: true
78+
79+
- name: Set up Python
80+
uses: actions/setup-python@v6
81+
with:
82+
python-version: ${{ env.PY_VERSION }}
83+
cache: 'pip'
84+
- name: Install dependencies
85+
run: |
86+
python -m pip install --upgrade pip setuptools
87+
pip install -r .github/requirements_doctests.txt
88+
pip install pytest pytest-cov
89+
- name: Install POT
90+
run: |
91+
pip install -e .
92+
- name: Run tests
93+
run: |
94+
python -m pytest -v ot/ test/conftest.py --doctest-modules --color=yes --cov=./ --cov-report=xml
95+
96+
linux-minimal:
97+
98+
runs-on: ubuntu-latest
99+
if: "!contains(github.event.head_commit.message, 'no ci')"
100+
steps:
101+
- uses: actions/checkout@v7
102+
with:
103+
submodules: true
104+
105+
- name: Set up Python
106+
uses: actions/setup-python@v6
107+
with:
108+
python-version: ${{ env.PY_VERSION }}
109+
cache: 'pip'
110+
- name: Install dependencies
111+
run: |
112+
python -m pip install --upgrade pip setuptools
113+
pip install pytest pytest-cov
114+
- name: Install POT
115+
run: |
116+
pip install -e .
117+
- name: Run tests
118+
run: |
119+
python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml
120+
121+
linux:
122+
runs-on: ubuntu-latest
123+
if: "!contains(github.event.head_commit.message, 'no ci')"
124+
strategy:
125+
max-parallel: 4
126+
matrix:
127+
python-version: ["3.11", "3.12", "3.13", "3.14"]
128+
129+
steps:
130+
# - name: Free Disk Space (Ubuntu)
131+
# uses: insightsengineering/disk-space-reclaimer@v1
132+
# with:
133+
# android: true
134+
# dotnet: true
135+
- uses: actions/checkout@v7
78136
with:
79137
submodules: true
80138

@@ -89,41 +147,100 @@ jobs:
89147
- name: Install dependencies
90148
run: |
91149
python -m pip install --upgrade pip setuptools
92-
pip install -r requirements_all.txt
150+
pip install -r .github/requirements_no_backend.txt
93151
pip install pytest pytest-cov
94152
- name: test POT import
95153
run: |
96154
python -c "import ot; print(ot.__version__)"
97155
- name: Run tests
98156
run: |
99-
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --cov=./ --cov-report=xml
157+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
100158
- name: Upload coverage reports to Codecov with GitHub Action
101159
uses: codecov/codecov-action@v4
102160

103-
linux-minimal-deps:
161+
linux-torch:
162+
runs-on: ubuntu-latest
163+
if: "!contains(github.event.head_commit.message, 'no ci')"
164+
165+
steps:
166+
- uses: actions/checkout@v7
167+
with:
168+
submodules: true
169+
170+
- name: Set up Python ${{ env.PY_VERSION }}
171+
uses: actions/setup-python@v6
172+
with:
173+
python-version: ${{ env.PY_VERSION }}
174+
cache: 'pip'
175+
- name: Install POT
176+
run: |
177+
pip install -e .
178+
- name: Install dependencies
179+
run: |
180+
python -m pip install --upgrade pip setuptools
181+
pip install torch torch_geometric geomloss pykeops scikit-learn
182+
pip install pytest pytest-cov
183+
- name: Run tests
184+
run: |
185+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
186+
- name: Upload coverage reports to Codecov with GitHub Action
187+
uses: codecov/codecov-action@v4
104188

189+
linux-jax:
105190
runs-on: ubuntu-latest
106191
if: "!contains(github.event.head_commit.message, 'no ci')"
192+
107193
steps:
108-
- uses: actions/checkout@v4
194+
- uses: actions/checkout@v7
109195
with:
110196
submodules: true
111197

112-
- name: Set up Python
113-
uses: actions/setup-python@v5
198+
- name: Set up Python ${{ env.PY_VERSION }}
199+
uses: actions/setup-python@v6
114200
with:
115-
python-version: "3.14"
201+
python-version: ${{ env.PY_VERSION }}
116202
cache: 'pip'
203+
- name: Install POT
204+
run: |
205+
pip install -e .
117206
- name: Install dependencies
118207
run: |
119208
python -m pip install --upgrade pip setuptools
209+
pip install jax jaxlib
120210
pip install pytest pytest-cov
211+
- name: Run tests
212+
run: |
213+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
214+
- name: Upload coverage reports to Codecov with GitHub Action
215+
uses: codecov/codecov-action@v4
216+
217+
linux-tf:
218+
runs-on: ubuntu-latest
219+
if: "!contains(github.event.head_commit.message, 'no ci')"
220+
221+
steps:
222+
- uses: actions/checkout@v7
223+
with:
224+
submodules: true
225+
226+
- name: Set up Python ${{ env.PY_VERSION }}
227+
uses: actions/setup-python@v6
228+
with:
229+
python-version: ${{ env.PY_VERSION }}
230+
cache: 'pip'
121231
- name: Install POT
122232
run: |
123233
pip install -e .
234+
- name: Install dependencies
235+
run: |
236+
python -m pip install --upgrade pip setuptools
237+
pip install tensorflow
238+
pip install pytest pytest-cov
124239
- name: Run tests
125240
run: |
126-
python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml
241+
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
242+
- name: Upload coverage reports to Codecov with GitHub Action
243+
uses: codecov/codecov-action@v4
127244

128245
# linux-minimal-deps-ft:
129246

@@ -151,30 +268,25 @@ jobs:
151268
# python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml
152269

153270
macos:
154-
runs-on: ${{ matrix.os }}
271+
runs-on: macos-latest
155272
if: "!contains(github.event.head_commit.message, 'no ci')"
156-
strategy:
157-
max-parallel: 4
158-
matrix:
159-
os: [macos-latest]
160-
python-version: ["3.13"]
161273

162274
steps:
163-
- uses: actions/checkout@v4
275+
- uses: actions/checkout@v7
164276
with:
165277
submodules: true
166-
- name: Set up Python ${{ matrix.python-version }}
167-
uses: actions/setup-python@v5
278+
- name: Set up Python ${{ env.PY_VERSION }}
279+
uses: actions/setup-python@v6
168280
with:
169-
python-version: ${{ matrix.python-version }}
281+
python-version: ${{ env.PY_VERSION }}
170282
cache: 'pip'
171283
- name: Install POT
172284
run: |
173285
pip install -e .
174286
- name: Install dependencies
175287
run: |
176288
python -m pip install --upgrade pip setuptools
177-
pip install -r requirements_all.txt
289+
pip install -r .github/requirements_no_backend.txt
178290
pip install pytest
179291
- name: Run tests
180292
run: |
@@ -184,19 +296,15 @@ jobs:
184296
windows:
185297
runs-on: windows-latest
186298
if: "!contains(github.event.head_commit.message, 'no ci')"
187-
strategy:
188-
max-parallel: 4
189-
matrix:
190-
python-version: ["3.13"]
191299

192300
steps:
193-
- uses: actions/checkout@v4
301+
- uses: actions/checkout@v7
194302
with:
195303
submodules: true
196-
- name: Set up Python ${{ matrix.python-version }}
197-
uses: actions/setup-python@v5
304+
- name: Set up Python ${{ env.PY_VERSION }}
305+
uses: actions/setup-python@v6
198306
with:
199-
python-version: ${{ matrix.python-version }}
307+
python-version: ${{ env.PY_VERSION }}
200308
cache: 'pip'
201309
- name: RC.exe
202310
run: |
@@ -213,7 +321,7 @@ jobs:
213321
Invoke-VSDevEnvironment
214322
Get-Command rc.exe | Format-Table -AutoSize
215323
- name: Update pip
216-
run : |
324+
run: |
217325
python -m pip install --upgrade pip setuptools
218326
python -m pip install cython
219327
- name: Install POT

.github/workflows/build_wheels.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v7
1919
with:
2020
submodules: true
21-
- name: Set up Python 3.10
22-
uses: actions/setup-python@v5
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: "3.11"
2525

@@ -41,5 +41,3 @@ jobs:
4141
with:
4242
name: wheels-${{ strategy.job-index }}
4343
path: ./wheelhouse
44-
45-

0 commit comments

Comments
 (0)