Skip to content

Commit cad61ac

Browse files
ColCarrollJunpeng Lao
authored andcommitted
Unpin theano (#2777)
* Unpin theano * test setup * setting MKL_THREADING_LAYER=GNU * Don't use mkl-service * Add nose * Add back mkl-service, for reasons * Try setting threading layer * Use export instead of set * Add pylint to requirements-dev * intermedia fix test setting `njobs=2`
1 parent a48ccb3 commit cad61ac

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: python
2-
sudo: false
2+
sudo: required
33

44
cache:
55
directories:
@@ -15,12 +15,11 @@ before_install:
1515
- . ./scripts/install_miniconda.sh
1616
- sh -e /etc/init.d/xvfb start
1717
- export DISPLAY=":99.0"
18+
- export MKL_THREADING_LAYER=GNU
1819

1920
install:
2021
- . ./scripts/create_testenv.sh
21-
- pip install coveralls pylint
22-
- pip install travis-sphinx==2.0.0
23-
- pip install -r requirements-dev.txt
22+
- pip install coveralls travis-sphinx==2.0.0
2423

2524
env:
2625
- 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"

pymc3/tests/test_sgfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def f(x, a, b, c):
3131
pm.Normal('y', mu=y, observed=y_obs)
3232

3333
step_method = pm.SGFS(batch_size=batch_size, step_size=1., total_size=total_size)
34-
trace = pm.sample(draws=draws, step=step_method, init=None)
34+
trace = pm.sample(draws=draws, step=step_method, init=None, njobs=2)
3535

3636
np.testing.assert_allclose(np.mean(trace['abc'], axis=0), np.asarray([a, b, c]), rtol=0.1)

pymc3/tests/test_text_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_supports_sampler_stats(self):
1212
with pm.Model():
1313
pm.Normal("mu", mu=0, sd=1, shape=2)
1414
db = text.Text(self.name)
15-
pm.sample(20, tune=10, init=None, trace=db)
15+
pm.sample(20, tune=10, init=None, trace=db, njobs=2)
1616

1717
def teardown_method(self):
1818
bf.remove_file_or_directory(self.name)

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ Keras>=2.0.8
66
matplotlib>=1.5.0
77
mock>=2.0.0; python_version < '3.4'
88
nbsphinx>=0.2.13
9+
nose>=1.3.7
910
nose-parameterized==0.6.0
1011
numdifftools>=0.9.20
1112
numpy>=1.11.0
1213
numpydoc==0.7.0
1314
pycodestyle>=2.3.1
1415
pyflakes>=1.5.0
16+
pylint>=1.7.4
1517
pytest-cov>=2.5.1
1618
pytest>=3.0.7
1719
recommonmark>=0.4.0

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
theano==0.9.0
1+
theano>=1.0.0
22
pandas>=0.18.0
33
patsy>=0.4.0
44
joblib>=0.9

scripts/create_testenv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ if [ ${PYTHON_VERSION} == "2.7" ]; then
4545
pip install mock
4646
fi
4747

48-
pip install pytest pytest-cov nose-parameterized pylint
48+
pip install -r requirements-dev.txt
4949

5050
# Install untested, non-required code (linter fails without them)
51-
pip install ipython ipywidgets numdifftools
51+
pip install ipython ipywidgets
5252

5353
# matplotlib is not required for the library, but is for tests
5454
pip install matplotlib

0 commit comments

Comments
 (0)