diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 121e9f75f..ab9c76f57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici @@ -60,7 +60,7 @@ jobs: file: ./coverage.xml mac: - runs-on: macos-12 + runs-on: macos-latest strategy: matrix: python-version: ['3.12'] @@ -80,14 +80,14 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici - name: Run tests timeout-minutes: 30 - run: tox -e base + run: ulimit -n 65536 65536 && tox -e base - name: Coverage uses: codecov/codecov-action@v3 @@ -116,7 +116,7 @@ jobs: path: | ~\AppData\Local\pip\Cache .tox - key: ${{ runner.os }}-${{ matrix.python-version }}-ci + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: | @@ -149,7 +149,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici pysb @@ -193,7 +193,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install julia uses: julia-actions/setup-julia@v1 @@ -242,7 +242,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh ipopt @@ -278,7 +278,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici @@ -314,7 +314,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici @@ -350,7 +350,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: pip install tox pre-commit @@ -382,7 +382,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh doc amici @@ -415,7 +415,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici ipopt @@ -445,7 +445,7 @@ jobs: path: | ~/.cache/pip .tox/ - key: ${{ runner.os }}-${{ matrix.python-version }}-ci-${{ github.job }} + key: "${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-ci-${{ github.job }}" - name: Install dependencies run: .github/workflows/install_deps.sh amici diff --git a/test/sample/test_sample.py b/test/sample/test_sample.py index a33adde18..4f1d6fb86 100644 --- a/test/sample/test_sample.py +++ b/test/sample/test_sample.py @@ -3,7 +3,6 @@ import os import numpy as np -import petab import pytest import scipy.optimize as so from scipy.integrate import quad @@ -11,10 +10,8 @@ import pypesto import pypesto.optimize as optimize -import pypesto.petab import pypesto.sample as sample from pypesto.C import OBJECTIVE_NEGLOGLIKE, OBJECTIVE_NEGLOGPOST -from pypesto.sample.pymc import PymcSampler def gaussian_llh(x): @@ -96,6 +93,10 @@ def rosenbrock_problem(): def create_petab_problem(): + import petab + + import pypesto.petab + current_path = os.path.dirname(os.path.realpath(__file__)) dir_path = os.path.abspath( os.path.join(current_path, "..", "..", "doc", "example") @@ -187,6 +188,8 @@ def sampler(request): n_chains=5, ) elif request.param == "Pymc": + from pypesto.sample.pymc import PymcSampler + return PymcSampler(tune=5, progressbar=False) elif request.param == "Emcee": return sample.EmceeSampler(nwalkers=10)