Skip to content
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

Can now change backend (using code from geomstats) #355

Closed
wants to merge 238 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
2ff69c8
Can now change backend (using code from geomstats)
FlorianPfaff Oct 16, 2023
0b7e23c
Using and testing all backends
FlorianPfaff Oct 16, 2023
ede7e38
Trying around
FlorianPfaff Oct 17, 2023
dab30dd
Update tests.yml
FlorianPfaff Oct 17, 2023
64a9f9c
Update tests.yml
FlorianPfaff Oct 17, 2023
a6952d2
Update tests.yml
FlorianPfaff Oct 17, 2023
e63f940
Update tests.yml
FlorianPfaff Oct 17, 2023
e0dcffa
Update tests.yml
FlorianPfaff Oct 17, 2023
fdd4e3c
Update tests.yml
FlorianPfaff Oct 17, 2023
d246077
Need to use typing.Union for pytorch
FlorianPfaff Oct 17, 2023
5925723
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 17, 2023
4f7edde
Typing fixes
FlorianPfaff Oct 17, 2023
0adc090
Replaced np.random
FlorianPfaff Oct 17, 2023
22c1fe3
Adjusted calls to np.pi
FlorianPfaff Oct 17, 2023
04abd41
Minor adjustment for backend
FlorianPfaff Oct 17, 2023
9978b88
Now using linalg of backend
FlorianPfaff Oct 17, 2023
be4c3b0
Morechanges
FlorianPfaff Oct 17, 2023
3182738
Even more
FlorianPfaff Oct 17, 2023
e65d209
More adapations
FlorianPfaff Oct 17, 2023
3a5e0a1
More
FlorianPfaff Oct 17, 2023
73145d2
More changes
FlorianPfaff Oct 17, 2023
050b02f
Changes
FlorianPfaff Oct 17, 2023
c1e6a96
More changes for backend
FlorianPfaff Oct 18, 2023
e39ea70
More adapations
FlorianPfaff Oct 18, 2023
3245c87
More changes for backend
FlorianPfaff Oct 18, 2023
b9863c7
Fix
FlorianPfaff Oct 18, 2023
d65ecd7
More backend adjustments
FlorianPfaff Oct 18, 2023
1b0a88f
Progress
FlorianPfaff Oct 18, 2023
673268c
More
FlorianPfaff Oct 18, 2023
924f4a1
Now using backend-specific diag
FlorianPfaff Oct 18, 2023
68406f7
More
FlorianPfaff Oct 18, 2023
549d02f
More
FlorianPfaff Oct 18, 2023
100364e
More
FlorianPfaff Oct 18, 2023
5254d8a
More....
FlorianPfaff Oct 18, 2023
35c93a0
More
FlorianPfaff Oct 18, 2023
7c9d979
More
FlorianPfaff Oct 18, 2023
37fab2f
More....
FlorianPfaff Oct 18, 2023
b8aa8bc
More.
FlorianPfaff Oct 18, 2023
e0bd968
More changes
FlorianPfaff Oct 18, 2023
e4c781a
More
FlorianPfaff Oct 19, 2023
fd04d58
More....
FlorianPfaff Oct 19, 2023
7129a36
More
FlorianPfaff Oct 19, 2023
29500ee
More........
FlorianPfaff Oct 19, 2023
056b025
More.
FlorianPfaff Oct 19, 2023
3290577
More, more, more
FlorianPfaff Oct 19, 2023
677230e
More..
FlorianPfaff Oct 19, 2023
b877231
Added multinomial to backend
FlorianPfaff Oct 19, 2023
6bd3b80
More adaptations
FlorianPfaff Oct 19, 2023
8350561
Update requirements.txt
invalid-email-address Oct 19, 2023
c1ec4e9
More...
FlorianPfaff Oct 19, 2023
14cebbf
More
FlorianPfaff Oct 19, 2023
cbe65d0
Yet more
FlorianPfaff Oct 19, 2023
8bbd824
More
FlorianPfaff Oct 19, 2023
6630fc0
More....
FlorianPfaff Oct 19, 2023
1a69096
Mooorrreeeee
FlorianPfaff Oct 19, 2023
4a3387b
More....
FlorianPfaff Oct 19, 2023
22ec6aa
More
FlorianPfaff Oct 19, 2023
d0cf9e1
Moooore
FlorianPfaff Oct 19, 2023
e2283dc
Update requirements.txt
invalid-email-address Oct 19, 2023
47f7cd9
More
FlorianPfaff Oct 19, 2023
7d0cce0
More..
FlorianPfaff Oct 20, 2023
65b8032
Added nonzero to backend
FlorianPfaff Oct 20, 2023
21d4362
Update requirements.txt
invalid-email-address Oct 20, 2023
b1420d8
More
FlorianPfaff Oct 20, 2023
95113b6
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 20, 2023
45549d5
More
FlorianPfaff Oct 20, 2023
73c2dfc
More....
FlorianPfaff Oct 21, 2023
2a1c1fa
More
FlorianPfaff Oct 21, 2023
adecfb0
Yet more
FlorianPfaff Oct 21, 2023
6a4c0b6
More.......
FlorianPfaff Oct 21, 2023
fe9a5da
More
FlorianPfaff Oct 21, 2023
14fcf2c
More...........
FlorianPfaff Oct 21, 2023
3859fb9
More
FlorianPfaff Oct 21, 2023
84caa99
More......
FlorianPfaff Oct 21, 2023
14526e2
More
FlorianPfaff Oct 21, 2023
60bd4f8
More
FlorianPfaff Oct 21, 2023
5e91bbc
Back
FlorianPfaff Oct 21, 2023
9fa3c25
more
FlorianPfaff Oct 22, 2023
f10770e
More...
FlorianPfaff Oct 22, 2023
2e9efaf
More
FlorianPfaff Oct 22, 2023
f5d5e8d
Update requirements.txt
invalid-email-address Oct 22, 2023
29bbf9e
More..............
FlorianPfaff Oct 22, 2023
3777ec7
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 22, 2023
f70e3c5
More....
FlorianPfaff Oct 22, 2023
28206bc
More...
FlorianPfaff Oct 22, 2023
a8d7545
More
FlorianPfaff Oct 22, 2023
786f0f0
More...
FlorianPfaff Oct 22, 2023
5d0e217
More............
FlorianPfaff Oct 22, 2023
9ee00bb
More.
FlorianPfaff Oct 22, 2023
5ad5c4a
More..
FlorianPfaff Oct 22, 2023
2415350
More
FlorianPfaff Oct 22, 2023
2564edb
More..........
FlorianPfaff Oct 22, 2023
ef5d219
More
FlorianPfaff Oct 22, 2023
14d31b9
More
FlorianPfaff Oct 22, 2023
9c96004
More......
FlorianPfaff Oct 22, 2023
eaa33af
More...
FlorianPfaff Oct 22, 2023
b9ff269
More.
FlorianPfaff Oct 22, 2023
9baa1ab
More........
FlorianPfaff Oct 22, 2023
58d4436
More..
FlorianPfaff Oct 22, 2023
03016f8
Make linter ignore pytorch
FlorianPfaff Oct 22, 2023
9d5cb9e
More
FlorianPfaff Oct 22, 2023
dafa89b
Do not check backend with megalinter
FlorianPfaff Oct 22, 2023
c36ea76
More
FlorianPfaff Oct 22, 2023
f614fdd
More...
FlorianPfaff Oct 22, 2023
5c770bd
More......
FlorianPfaff Oct 22, 2023
0612b12
More
FlorianPfaff Oct 22, 2023
552e8a9
Update requirements.txt
invalid-email-address Oct 22, 2023
5f5f905
More
FlorianPfaff Oct 22, 2023
5590d8c
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 22, 2023
b2249ac
More
FlorianPfaff Oct 22, 2023
b6ae085
More...
FlorianPfaff Oct 22, 2023
38a697b
More....
FlorianPfaff Oct 23, 2023
2bfa383
More
FlorianPfaff Oct 23, 2023
def5234
More + linter changes
FlorianPfaff Oct 23, 2023
3b08b87
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 23, 2023
9e7c8d7
More....
FlorianPfaff Oct 23, 2023
8b157b2
More
FlorianPfaff Oct 23, 2023
22d5797
Fix
FlorianPfaff Oct 23, 2023
3e166af
Ignoring import pyrecest.backend linter warnings
FlorianPfaff Oct 23, 2023
d343836
More
FlorianPfaff Oct 23, 2023
9769ccf
More
FlorianPfaff Oct 23, 2023
b01d4ae
More
FlorianPfaff Oct 23, 2023
db7d15f
More
FlorianPfaff Oct 23, 2023
278972c
Ignore linter warnings for all, sum, any
FlorianPfaff Oct 23, 2023
0f00bea
More.....
FlorianPfaff Oct 23, 2023
da49fe7
More
FlorianPfaff Oct 23, 2023
8948afa
More.......
FlorianPfaff Oct 23, 2023
433368f
More.............
FlorianPfaff Oct 23, 2023
304731e
More...
FlorianPfaff Oct 23, 2023
6f8f60f
More...
FlorianPfaff Oct 23, 2023
d3500ea
Let megalinter pass once so that the cache is generated
FlorianPfaff Oct 23, 2023
a82e3b2
Reverted change to megalinter
FlorianPfaff Oct 23, 2023
5577978
Adapted tests
FlorianPfaff Oct 23, 2023
0de563d
Fixes
FlorianPfaff Oct 23, 2023
f6c256d
Trying around
FlorianPfaff Oct 23, 2023
d25f918
Trying
FlorianPfaff Oct 23, 2023
4cea947
More trying
FlorianPfaff Oct 23, 2023
e16c955
Flag for cpu support
FlorianPfaff Oct 23, 2023
5ec54e1
Update requirements.txt
invalid-email-address Oct 23, 2023
2641300
Removed poetry.lock so that it gets updated
FlorianPfaff Oct 23, 2023
f148d18
Test
FlorianPfaff Oct 23, 2023
02a9379
Merge branch 'backends' of https://github.com/FlorianPfaff/pyRecEst i…
FlorianPfaff Oct 23, 2023
26280ea
Try
FlorianPfaff Oct 23, 2023
30e1ada
Try
FlorianPfaff Oct 23, 2023
8fdb218
Try with pytorch_support = ["torch", "torchvision", "torchaudio"]
FlorianPfaff Oct 23, 2023
2240d4c
Next try for toml
FlorianPfaff Oct 23, 2023
9d6bfca
Next try
FlorianPfaff Oct 23, 2023
f53861c
Try
FlorianPfaff Oct 23, 2023
a47417e
Linter fixes
FlorianPfaff Oct 23, 2023
f1a0cb1
Trying to ignore some pylint directives
FlorianPfaff Oct 23, 2023
100337e
More
FlorianPfaff Oct 23, 2023
7718253
More........
FlorianPfaff Oct 23, 2023
63e2d59
More....
FlorianPfaff Oct 23, 2023
77652f5
More.........
FlorianPfaff Oct 23, 2023
c4f86e7
More....
FlorianPfaff Oct 23, 2023
646504b
More.
FlorianPfaff Oct 23, 2023
4791486
More..
FlorianPfaff Oct 23, 2023
e5f9fdd
More..
FlorianPfaff Oct 23, 2023
f155f63
More...
FlorianPfaff Oct 23, 2023
6e4734c
More...
FlorianPfaff Oct 23, 2023
4cd7f20
More..
FlorianPfaff Oct 23, 2023
2757cfd
More..
FlorianPfaff Oct 23, 2023
3749970
More......
FlorianPfaff Oct 24, 2023
65b3fd0
More
FlorianPfaff Oct 24, 2023
26b9b55
More
FlorianPfaff Oct 24, 2023
726349a
More...
FlorianPfaff Oct 24, 2023
0b1321e
More
FlorianPfaff Oct 24, 2023
de12c8b
More...
FlorianPfaff Oct 24, 2023
6dd96aa
More...
FlorianPfaff Oct 24, 2023
3e53d77
More..
FlorianPfaff Oct 24, 2023
8ba9589
More.........
FlorianPfaff Oct 24, 2023
79a380e
More..........
FlorianPfaff Oct 24, 2023
75be01f
More....
FlorianPfaff Oct 24, 2023
a8246de
More
FlorianPfaff Oct 24, 2023
f75b861
More
FlorianPfaff Oct 24, 2023
addc4f7
Also test numpy backend
FlorianPfaff Oct 24, 2023
06675df
More...
FlorianPfaff Oct 24, 2023
e9d19f0
More
FlorianPfaff Oct 24, 2023
91d8496
More....
FlorianPfaff Oct 24, 2023
b7838eb
More
FlorianPfaff Oct 24, 2023
e370a8a
More...
FlorianPfaff Oct 24, 2023
f1980b6
More.....
FlorianPfaff Oct 24, 2023
185d934
More...
FlorianPfaff Oct 24, 2023
fb88142
Moore
FlorianPfaff Oct 24, 2023
f59499b
More....
FlorianPfaff Oct 24, 2023
c3e1b11
Moore
FlorianPfaff Oct 24, 2023
a726247
More.........
FlorianPfaff Oct 24, 2023
097d6cb
Liniter changes
FlorianPfaff Oct 24, 2023
1ab9576
More
FlorianPfaff Oct 24, 2023
d18e5e3
Added jax backend
FlorianPfaff Oct 24, 2023
c219a80
Tests for jax backend
FlorianPfaff Oct 24, 2023
ca578bc
More
FlorianPfaff Oct 24, 2023
b85e7ea
Also install jax
FlorianPfaff Oct 24, 2023
c62d401
More
FlorianPfaff Oct 24, 2023
f6b66de
More
FlorianPfaff Oct 24, 2023
b156c03
More
FlorianPfaff Oct 24, 2023
0e27503
More
FlorianPfaff Oct 24, 2023
ecb3871
Commeted out jax tests
FlorianPfaff Oct 24, 2023
cd63d97
More
FlorianPfaff Oct 24, 2023
7aead31
Default numpy
FlorianPfaff Oct 24, 2023
2beb96a
More....
FlorianPfaff Oct 24, 2023
a729774
More...
FlorianPfaff Oct 24, 2023
55935b4
More......
FlorianPfaff Oct 24, 2023
fd0ad7c
More
FlorianPfaff Oct 24, 2023
a7e6c90
More...
FlorianPfaff Oct 24, 2023
7ac4c36
More.
FlorianPfaff Oct 24, 2023
6f0caca
More
FlorianPfaff Oct 24, 2023
263d319
More...
FlorianPfaff Oct 24, 2023
2d455a9
Default to pytorch
FlorianPfaff Oct 24, 2023
266bcd1
More
FlorianPfaff Oct 24, 2023
6af2a10
More...
FlorianPfaff Oct 24, 2023
95e960d
Minor fix
FlorianPfaff Oct 24, 2023
019ed97
More
FlorianPfaff Oct 24, 2023
b727942
More...
FlorianPfaff Oct 24, 2023
9174ca8
More....
FlorianPfaff Oct 24, 2023
505caf4
Linter fixes etc
FlorianPfaff Oct 24, 2023
b2d083c
More
FlorianPfaff Oct 24, 2023
bc137e1
More...
FlorianPfaff Oct 25, 2023
a1fedb1
Try
FlorianPfaff Oct 25, 2023
f1d76e1
More
FlorianPfaff Oct 25, 2023
5381e17
Fixes
FlorianPfaff Oct 25, 2023
4c140fb
More....
FlorianPfaff Oct 25, 2023
577c41b
More
FlorianPfaff Oct 25, 2023
7277ad8
More
FlorianPfaff Oct 25, 2023
8a9890a
More...
FlorianPfaff Oct 25, 2023
55fb75f
More..
FlorianPfaff Oct 25, 2023
b14b477
More.....
FlorianPfaff Oct 25, 2023
9454779
More
FlorianPfaff Oct 25, 2023
08aae6d
More
FlorianPfaff Oct 25, 2023
276bdf8
More.
FlorianPfaff Oct 25, 2023
ab2ad02
More...
FlorianPfaff Oct 25, 2023
101e893
More
FlorianPfaff Oct 25, 2023
e6bfb02
More...
FlorianPfaff Oct 25, 2023
dea6d8a
More
FlorianPfaff Oct 25, 2023
590cce9
More
FlorianPfaff Oct 25, 2023
f73bc0d
Cleanup
FlorianPfaff Oct 25, 2023
f715e79
Set default to numpy
FlorianPfaff Oct 25, 2023
33e4451
More
FlorianPfaff Oct 25, 2023
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
10 changes: 6 additions & 4 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
key: ${{ runner.os }}-alpine-wheels-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-alpine-wheels-${{ hashFiles('requirements-dev.txt') }}

- name: Set up Alpine Linux
if: steps.cache-wheels.outputs.cache-hit != 'true'
uses: jirutka/setup-alpine@v1
Expand All @@ -76,7 +75,6 @@ jobs:
py3-pkgconfig
curl-dev
zlib-dev

- name: List workspace
run: ls -l .

Expand All @@ -93,6 +91,12 @@ jobs:
sed 's/==.*//' requirements-dev.txt > requirements-dev_no_version.txt
shell: alpine.sh {0}

- name: Remove torch entry (unsupported by alpine)
if: steps.cache-wheels.outputs.cache-hit != 'true'
run: |
sed -i '/^torch/d' requirements-dev_no_version.txt
shell: alpine.sh {0}

- name: Run CMake to find LAPACK
if: steps.cache-wheels.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -186,7 +190,6 @@ jobs:
path: |
megalinter-reports
mega-linter.log

# Create Pull Request step
- name: Create Pull Request with applied fixes
id: cpr
Expand All @@ -206,7 +209,6 @@ jobs:
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

# Push new commit if applicable (for now works only on PR from same repository, not from forks)
- name: Prepare commit
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
Expand Down
39 changes: 32 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,50 @@ jobs:

- name: Install dependencies
run: |
export CUDA_VISIBLE_DEVICES=""
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --extras healpy_support
poetry env use python
poetry install --extras "healpy_support" --extras "pytorch_support" --extras "jax_support"
poetry run python -m pip install torch==2.1.0+cpu torchaudio==2.1.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

- name: List files and check Python and package versions
run: |
ls -al
python -c 'import sys; print(sys.version_info[:])'
python -m pip freeze
poetry env use python
poetry run python -c 'import sys; print(sys.version_info[:])'
poetry run python -m pip freeze
poetry run python -c "import torch; print(torch.version.cuda)"

- name: Run tests
- name: Run tests with numpy backend
run: |
poetry env use python
poetry run python -m pytest --rootdir . -v --strict-config --junitxml=junit_test_results.xml ./pyrecest
export PYRECEST_BACKEND=numpy
poetry run python -m pytest --rootdir . -v --strict-config --junitxml=junit_test_results_numpy.xml ./pyrecest
env:
PYTHONPATH: ${{ github.workspace }}

- name: Run tests with pytorch backend
if: always()
run: |
poetry env use python
export PYRECEST_BACKEND=pytorch
poetry run python -m pytest --rootdir . -v --strict-config --junitxml=junit_test_results_pytorch.xml ./pyrecest
env:
PYTHONPATH: ${{ github.workspace }}

#- name: Run tests with jax backend
# if: always()
# run: |
# poetry env use python
# export PYRECEST_BACKEND=jax
# poetry run python -m pytest --rootdir . -v --strict-config --junitxml=junit_test_results_jax.xml ./pyrecest
# env:
# PYTHONPATH: ${{ github.workspace }}

- name: Publish test results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: junit_test_results.xml
files: |
junit_test_results_numpy.xml
junit_test_results_pytorch.xml
2 changes: 1 addition & 1 deletion .github/workflows/update-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: python -m poetry update

- name: Update requirements.txt
run: python -m poetry export --format requirements.txt --output requirements.txt --extras healpy_support --without-hashes
run: python -m poetry export --format requirements.txt --output requirements.txt --extras healpy_support --extras pytorch_support --without-hashes

- name: Update requirements-dev.txt
run: python -m poetry export --with dev --format requirements.txt --output requirements-dev.txt --without-hashes
Expand Down
3 changes: 3 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore": ["pyrecest/_backend/**"]
}
2 changes: 2 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ DISABLE_LINTERS:
- JSON_JSONLINT # Disable because there is only .devcontainer.json, for which it throws an unwanted warning
- MAKEFILE_CHECKMAKE # Not using a Makefile
- SPELL_LYCHEE # Takes pretty long

FILTER_REGEX_EXCLUDE: "pyrecest._backend/*"
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ignore-patterns=^\.#
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
ignored-modules=pyrecest.backend

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
Expand Down
Loading