Skip to content

moving solvers related code to solvers/* directory, improving fista and nnls_hals #1076

moving solvers related code to solvers/* directory, improving fista and nnls_hals

moving solvers related code to solvers/* directory, improving fista and nnls_hals #1076

Workflow file for this run

name: Test TensorLy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BACKEND: ['numpy', 'pytorch']
python-version: ['3.12']
include:
- BACKEND: 'numpy'
python-version: '3.8'
- BACKEND: 'numpy'
python-version: '3.9'
TENSORLY_TENALG_BACKEND: ['einsum']
- BACKEND: 'jax'
python-version: '3.12'
TENSORLY_TENALG_BACKEND: ['einsum']
- BACKEND: 'tensorflow'
python-version: '3.12'
TENSORLY_TENALG_BACKEND: ['einsum']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
requirements.txt
- name: Install dependencies and backend ${{matrix.BACKEND}}
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r doc/requirements_doc.txt
echo "Installing dependencies for BACKEND=${{matrix.BACKEND}}"
if [[ "${{matrix.BACKEND}}" == "numpy" ]]; then
echo "Installing sparse";
pip install sparse;
elif [[ "${{matrix.BACKEND}}" == "pytorch" ]]; then
echo "Installing PyTorch";
pip install torch torchvision;
elif [[ "${{matrix.BACKEND}}" == "tensorflow" ]]; then
echo "Installing TensorFlow";
pip install tensorflow;
elif [[ "${{matrix.BACKEND}}" == "jax" ]]; then
echo "Installing JAX";
pip install jax jaxlib;
fi
- name: Install package
run: |
python -m pip install -e .
- name: Test with backend ${{matrix.BACKEND}} pytest and coverage
run: |
TENSORLY_BACKEND=${{matrix.BACKEND}} pytest -vv --cov tensorly --cov-report xml --durations=10 tensorly
- name: Check coverage with CodeCov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
verbose: true