From a3511b6c7efe0746c5454e08e1977fe5b81a3924 Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Wed, 22 Nov 2017 11:25:28 -0500 Subject: [PATCH 01/10] Unpin theano --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5b33e02107..9fb0fe42b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -theano==0.9.0 +theano>=1.0.0 pandas>=0.18.0 patsy>=0.4.0 joblib>=0.9 From 75d03060a1741592070f53e5b478c0a1721c37e9 Mon Sep 17 00:00:00 2001 From: Junpeng Lao Date: Tue, 9 Jan 2018 18:30:47 +0100 Subject: [PATCH 02/10] test setup --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1de5f18a93..bb0e72bd80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: python -sudo: false +sudo: required cache: directories: @@ -15,6 +15,7 @@ before_install: - . ./scripts/install_miniconda.sh - sh -e /etc/init.d/xvfb start - export DISPLAY=":99.0" + - set MKL_THREADING_LAYER=GNU install: - . ./scripts/create_testenv.sh From 475938929c45402dd6878b18161085a33b1f82ea Mon Sep 17 00:00:00 2001 From: Junpeng Lao Date: Tue, 9 Jan 2018 18:41:48 +0100 Subject: [PATCH 03/10] setting MKL_THREADING_LAYER=GNU --- .travis.yml | 1 - scripts/create_testenv.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb0e72bd80..b1133254c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ before_install: - . ./scripts/install_miniconda.sh - sh -e /etc/init.d/xvfb start - export DISPLAY=":99.0" - - set MKL_THREADING_LAYER=GNU install: - . ./scripts/create_testenv.sh diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 3eac7eb0fb..d4a0b5e1d8 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -33,7 +33,7 @@ then source activate ${ENVNAME} fi fi -conda install --yes numpy scipy mkl-service +conda install --yes numpy scipy mkl-service && export MKL_THREADING_LAYER=GNU pip install --upgrade pip From dbf282fff84a6ff04a019c6fc31ce11e7fd84dcf Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 9 Jan 2018 12:50:27 -0500 Subject: [PATCH 04/10] Don't use mkl-service --- scripts/create_testenv.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index d4a0b5e1d8..375c781175 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -33,7 +33,7 @@ then source activate ${ENVNAME} fi fi -conda install --yes numpy scipy mkl-service && export MKL_THREADING_LAYER=GNU +conda install --yes numpy scipy pip install --upgrade pip @@ -45,10 +45,10 @@ if [ ${PYTHON_VERSION} == "2.7" ]; then pip install mock fi -pip install pytest pytest-cov nose-parameterized pylint +pip install -r requirements-dev.txt # Install untested, non-required code (linter fails without them) -pip install ipython ipywidgets numdifftools +pip install ipython ipywidgets # matplotlib is not required for the library, but is for tests pip install matplotlib From 57dafda6a15b774a128afe03a7c67bdd2aaf2a99 Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Tue, 9 Jan 2018 12:59:27 -0500 Subject: [PATCH 05/10] Add nose --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 52c47defd4..ad777a7fae 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ Keras>=2.0.8 matplotlib>=1.5.0 mock>=2.0.0; python_version < '3.4' nbsphinx>=0.2.13 +nose>=1.3.7 nose-parameterized==0.6.0 numdifftools>=0.9.20 numpy>=1.11.0 From bbea808e1a332b118e19374c688bf6eed9e74a15 Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Tue, 9 Jan 2018 13:58:15 -0500 Subject: [PATCH 06/10] Add back mkl-service, for reasons --- .travis.yml | 4 +--- scripts/create_testenv.sh | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1133254c3..2bfdfb423a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,7 @@ before_install: install: - . ./scripts/create_testenv.sh - - pip install coveralls pylint - - pip install travis-sphinx==2.0.0 - - pip install -r requirements-dev.txt + - pip install coveralls travis-sphinx==2.0.0 env: - PYTHON_VERSION=2.7 FLOATX='float32' TESTCMD="--durations=10 --ignore=pymc3/tests/test_examples.py --cov-append --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py --ignore=pymc3/tests/test_updates.py --ignore=pymc3/tests/test_posteriors.py --ignore=pymc3/tests/test_sampling.py" diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 375c781175..881a303c0e 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -33,7 +33,7 @@ then source activate ${ENVNAME} fi fi -conda install --yes numpy scipy +conda install --yes numpy scipy mkl-service pip install --upgrade pip From 42da69fd5e018dbb7dbb7cef78b074c915df69b9 Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Tue, 9 Jan 2018 14:11:16 -0500 Subject: [PATCH 07/10] Try setting threading layer --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2bfdfb423a..595fa974bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ before_install: - . ./scripts/install_miniconda.sh - sh -e /etc/init.d/xvfb start - export DISPLAY=":99.0" + - set MKL_THREADING_LAYER=GNU install: - . ./scripts/create_testenv.sh From 4882a1826bef7930269314f032e98249277c5711 Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Tue, 9 Jan 2018 14:34:56 -0500 Subject: [PATCH 08/10] Use export instead of set --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 595fa974bb..7956a267aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ before_install: - . ./scripts/install_miniconda.sh - sh -e /etc/init.d/xvfb start - export DISPLAY=":99.0" - - set MKL_THREADING_LAYER=GNU + - export MKL_THREADING_LAYER=GNU install: - . ./scripts/create_testenv.sh From 726f1fc39e68b9aab865baa615a78478a00dcc7e Mon Sep 17 00:00:00 2001 From: Colin Carroll Date: Tue, 9 Jan 2018 14:43:19 -0500 Subject: [PATCH 09/10] Add pylint to requirements-dev --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index ad777a7fae..d2f9ab1c37 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,6 +13,7 @@ numpy>=1.11.0 numpydoc==0.7.0 pycodestyle>=2.3.1 pyflakes>=1.5.0 +pylint>=1.7.4 pytest-cov>=2.5.1 pytest>=3.0.7 recommonmark>=0.4.0 From 59e6bbd7e8d8be9424cee9f198d47d6c91b70b96 Mon Sep 17 00:00:00 2001 From: Junpeng Lao Date: Thu, 11 Jan 2018 11:54:35 +0100 Subject: [PATCH 10/10] intermedia fix test setting `njobs=2` --- pymc3/tests/test_sgfs.py | 2 +- pymc3/tests/test_text_backend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pymc3/tests/test_sgfs.py b/pymc3/tests/test_sgfs.py index ed4dcc30dc..589eccf508 100644 --- a/pymc3/tests/test_sgfs.py +++ b/pymc3/tests/test_sgfs.py @@ -31,6 +31,6 @@ def f(x, a, b, c): pm.Normal('y', mu=y, observed=y_obs) step_method = pm.SGFS(batch_size=batch_size, step_size=1., total_size=total_size) - trace = pm.sample(draws=draws, step=step_method, init=None) + trace = pm.sample(draws=draws, step=step_method, init=None, njobs=2) np.testing.assert_allclose(np.mean(trace['abc'], axis=0), np.asarray([a, b, c]), rtol=0.1) diff --git a/pymc3/tests/test_text_backend.py b/pymc3/tests/test_text_backend.py index 0eec24574b..457c8e78bf 100644 --- a/pymc3/tests/test_text_backend.py +++ b/pymc3/tests/test_text_backend.py @@ -12,7 +12,7 @@ def test_supports_sampler_stats(self): with pm.Model(): pm.Normal("mu", mu=0, sd=1, shape=2) db = text.Text(self.name) - pm.sample(20, tune=10, init=None, trace=db) + pm.sample(20, tune=10, init=None, trace=db, njobs=2) def teardown_method(self): bf.remove_file_or_directory(self.name)