From 190e9865d6fbe474b9e0c35f59292837ad6bb035 Mon Sep 17 00:00:00 2001 From: Marco Gorelli Date: Fri, 27 Nov 2020 08:31:24 +0000 Subject: [PATCH 1/3] make test less strict --- .github/workflows/arviz_compat.yml | 2 +- .github/workflows/pytest.yml | 2 +- pymc3/tests/test_gp.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/arviz_compat.yml b/.github/workflows/arviz_compat.yml index 497b7d39df..c3b264530c 100644 --- a/.github/workflows/arviz_compat.yml +++ b/.github/workflows/arviz_compat.yml @@ -42,4 +42,4 @@ jobs: conda activate testenv conda remove arviz -y pip install git+git://github.com/arviz-devs/arviz.git - python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto + python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 89b3ef09df..89a891440d 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -80,7 +80,7 @@ jobs: use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - run: | conda activate testenv - python -m pytest -v --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto + python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/pymc3/tests/test_gp.py b/pymc3/tests/test_gp.py index d15189e2ac..7aed383422 100644 --- a/pymc3/tests/test_gp.py +++ b/pymc3/tests/test_gp.py @@ -1143,8 +1143,8 @@ def testMarginalKronvsMarginalpredict(self): f = kron_gp.marginal_likelihood("f", self.Xs, self.y, sigma=self.sigma, shape=self.N) p = kron_gp.conditional("p", self.Xnew) mu, cov = kron_gp.predict(self.Xnew) - npt.assert_allclose(mu, self.mu, atol=0, rtol=1e-2) - npt.assert_allclose(cov, self.cov, atol=0, rtol=1e-2) + npt.assert_allclose(mu, self.mu, atol=1e-5, rtol=1e-2) + npt.assert_allclose(cov, self.cov, atol=1e-5, rtol=1e-2) def testMarginalKronvsMarginal(self): with pm.Model() as kron_model: From 8848620615b7c717d0eb08a669e28ccd9e10bd82 Mon Sep 17 00:00:00 2001 From: Marco Gorelli Date: Fri, 27 Nov 2020 10:28:49 +0000 Subject: [PATCH 2/3] no parallel testing --- .github/workflows/pytest.yml | 2 +- environment-dev.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 89a891440d..17f05d642a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -80,7 +80,7 @@ jobs: use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - run: | conda activate testenv - python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto + python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/environment-dev.yml b/environment-dev.yml index 5be141561e..c4ea7693cb 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -24,7 +24,6 @@ dependencies: - pre-commit>=2.8.0 - pytest-cov>=2.5 - pytest>=3.0 - - pytest-xdist - recommonmark>=0.4 - seaborn>=0.8 - sphinx-autobuild>=0.7 From 13f2f5673fec6fc711c92e68a11e0989cf3f1849 Mon Sep 17 00:00:00 2001 From: Marco Gorelli Date: Fri, 27 Nov 2020 10:36:41 +0000 Subject: [PATCH 3/3] dont parallelise arviz tests either --- .github/workflows/arviz_compat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arviz_compat.yml b/.github/workflows/arviz_compat.yml index c3b264530c..af5b31d5ee 100644 --- a/.github/workflows/arviz_compat.yml +++ b/.github/workflows/arviz_compat.yml @@ -42,4 +42,4 @@ jobs: conda activate testenv conda remove arviz -y pip install git+git://github.com/arviz-devs/arviz.git - python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET -n auto + python -m pytest -vv --cov=pymc3 --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET