pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

6 tests failed, 5 skiped when run pymc.test() #122

Closed FrankYu closed 8 years ago

FrankYu commented 8 years ago

python -c 'import pymc;pymc.test()'

Running unit tests for pymc.tests NumPy version 1.11.0 NumPy relaxed strides checking option: False NumPy is installed in /opt/local/lib/python2.7/site-packages/numpy Python version 2.7.11 (default, May 3 2016, 16:18:40) [GCC 4.9.3] nose version 1.3.7 Plotting disabled ..E..../opt/local/lib/python2.7/site-packages/pymc/Node.py:403: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future self.name = input['name'] /opt/local/lib/python2.7/site-packages/pymc/Node.py:403: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future self.name = input['name'] ...E.EEEE..S........S..........S.............................................................................................0 x 1 (x_pow_2) dtype: object .....SS....................[-----------------100%-----------------] 1000 of 1000 complete in 0.3 sec .[-----------------100%-----------------] 1000 of 1000 complete in 0.1 sec

...............

ERROR: Failure: OSError ([Errno 17] File exists: 'testresults/test_MCMC/Chain_0')

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/opt/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/opt/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_MCMCSampler.py", line 42, in class test_MCMC(TestCase): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_MCMCSampler.py", line 53, in test_MCMC M.sample(2000, 100, thin=15, verbose=0, progress_bar=False) File "/opt/local/lib/python2.7/site-packages/pymc/MCMC.py", line 286, in sample Sampler.sample(self, iter, length, verbose) File "/opt/local/lib/python2.7/site-packages/pymc/Model.py", line 237, in sample self.db._initialize(self._funs_to_tally, length) File "/opt/local/lib/python2.7/site-packages/pymc/database/txt.py", line 133, in _initialize os.mkdir(dir) OSError: [Errno 17] File exists: 'testresults/test_MCMC/Chain_0'

ERROR: test_independent_normal (pymc.tests.test_convergence.test_effective_n)

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_convergence.py", line 97, in test_independent_normal n_eff = np.mean([pymc.effective_n(np.random.normal(size=(m,n))) for i in range(1000)]) AttributeError: 'module' object has no attribute 'effective_n'

ERROR: test_simple (pymc.tests.test_convergence.test_gelman_rubin)

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_convergence.py", line 116, in test_simple gr = pymc.gelman_rubin(S2) AttributeError: 'module' object has no attribute 'gelman_rubin'

ERROR: test_independent (pymc.tests.test_convergence.test_geweke)

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_convergence.py", line 64, in testindependent for in range(1000)] AttributeError: 'module' object has no attribute 'geweke'

ERROR: test_simple (pymc.tests.test_convergence.test_geweke)

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_convergence.py", line 80, in test_simple scores = pymc.geweke(S, intervals=intervals, maxlag=5) AttributeError: 'module' object has no attribute 'geweke'

ERROR: test_simple (pymc.tests.test_convergence.test_iat)

Traceback (most recent call last): File "/opt/local/lib/python2.7/site-packages/pymc/tests/test_convergence.py", line 126, in test_simple iat = pymc.iat(x) AttributeError: 'module' object has no attribute 'iat'


Ran 173 tests in 6.222s

FAILED (SKIP=5, errors=6) [root@minimal-64 ~]#

fonnesbeck commented 8 years ago

PyMC has not been installed properly. Check the install log.

FrankYu commented 8 years ago

Hi @fonnesbeck I install matplotlib and re-run the test, result is "177 tests, 5 skip, no failed." So that mean I have install pymc correctly, right? Thanks

Details:

Running unit tests for pymc.tests NumPy version 1.11.0 NumPy relaxed strides checking option: False NumPy is installed in /opt/local/lib/python2.7/site-packages/numpy Python version 2.7.11 (default, May 3 2016, 16:18:40) [GCC 4.9.3] nose version 1.3.7 ..E..../opt/local/lib/python2.7/site-packages/pymc/Node.py:403: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future self.name = input['name'] /opt/local/lib/python2.7/site-packages/pymc/Node.py:403: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future self.name = input['name'] ....... ....... filename_or_obj, self.figure.dpi) .....0 x 1 (x_pow_2) dtype: object .....SS....................[-----------------100%-----------------] 1000 of 1000 complete in 0.3 sec .[-----------------100%-----------------] 1000 of 1000 complete in 0.1 sec

...............

Ran 177 tests in 20.810s

OK (SKIP=5)

fonnesbeck commented 8 years ago

Looks good!

FrankYu commented 8 years ago

Thanks.