-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/pytests.yml → .github/workflows/lie_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: pytests | ||
name: test-lie-groups | ||
on: | ||
pull_request: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: test-optimizers | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test_optimizers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, 3.10.15] | ||
steps: | ||
- uses: actions/checkout@v4.1.3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5.2.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v4.1.3 | ||
- name: Install suitesparse | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y libsuitesparse-dev | ||
- name: Create Conda env | ||
run: | | ||
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | ||
/bin/bash ~/miniconda.sh -b -p ~/conda | ||
export PATH=~/conda/bin:$PATH | ||
conda create --name theseus python=${{ matrix.python-version }} | ||
source activate theseus | ||
pip install --progress-bar off --upgrade pip | ||
pip install --progress-bar off --upgrade setuptools | ||
- name: Install Torch | ||
run: | | ||
export PATH=~/conda/bin:$PATH | ||
source activate theseus | ||
pip install torch | ||
- name: Build Baspacho GPU | ||
run: | | ||
sudo apt-get install -y libopenblas-pthread-dev | ||
git clone https://github.com/facebookresearch/baspacho.git | ||
cd baspacho | ||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBLA_STATIC=ON -DBASPACHO_USE_CUBLAS=0 -DBUILD_SHARED_LIBS=OFF -DBASPACHO_BUILD_TESTS=OFF -DBASPACHO_BUILD_EXAMPLES=OFF | ||
cmake --build build -- -j16 | ||
- name: Install torchlie and torchkin | ||
run: | | ||
export PATH=~/conda/bin:$PATH | ||
source activate theseus | ||
cd torchlie | ||
pip install -e . | ||
cd ../torchkin | ||
pip install -e . | ||
- name: Install theseus without Baspacho | ||
run: | | ||
export PATH=~/conda/bin:$PATH | ||
source activate theseus | ||
pip install -e ".[dev]" | ||
- name: Run Optimizer tests | ||
run: | | ||
export PATH=~/conda/bin:$PATH | ||
source activate theseus | ||
# the full baspacho test for CPU fails, we only run an abriged version in CI | ||
python -m pytest tests/theseus_tests/optimizer -m "not cudaext" -k "not test_baspacho_solver_cpu_full" | ||
python -m pytest tests/theseus_tests/test_theseus_layer.py -m "not cudaext" |