Open maresb opened 3 years ago
@maresb removing dependencies is always a good thing. However, I have no better strategy to answer your question than recommending a series of tests:
The real place to improve the dependency management though is the Aesara feedstock: https://github.com/conda-forge/aesara-feedstock/ Because in the end all these dependencies really belong to Aesara. PyMC3 itself doesn't interact with them directly.
@michaelosthege thanks for the advice.
I really have very little sense of what's going on internally. For example, the current release version is still 3.X, so I really don't understand what Aesara has to do with anything at the moment.
Regarding the test suite, I just tried running pytest --pyargs pymc3.tests
locally, but I got the following error.
_________________________ ERROR collecting test_sampling_jax.py __________________________
/opt/conda/lib/python3.8/site-packages/pymc3/tests/test_sampling_jax.py:5: in <module>
from pymc3.sampling_jax import sample_numpyro_nuts
/opt/conda/lib/python3.8/site-packages/pymc3/sampling_jax.py:18: in <module>
from theano.link.jax.jax_dispatch import jax_funcify
/opt/conda/lib/python3.8/site-packages/theano/link/jax/jax_dispatch.py:86: in <module>
jax.config.disable_omnistaging()
/opt/conda/lib/python3.8/site-packages/jax/config.py:167: in disable_omnistaging
raise Exception(
E Exception: Disabling of omnistaging is no longer supported in JAX version 0.2.12 and higher: see https://github.com/google/jax/blob/master/design_notes/omnistaging.md.
Do we need to add jax <=0.2.12
to the requirements, or is the test itself problematic?
So... how shall we proceed? Shall we give up on 3.X and hope that 4.X comes out sometime soon, and then deal with dependencies there via Aesara? Or is there some subset of tests which I could run which are expected to pass on a vanilla install of PyMC3?
So... how shall we proceed? Shall we give up on 3.X and hope that 4.X comes out sometime soon, and then deal with dependencies there via Aesara?
The problems with installation of dependencies apply to both PyMC3 v3.x
and v4.x
.
The Aesara ( pymc3 >=4
) is the successor of Theano-PyMC (pymc3 <4
), but apart from the name change and huge internal refactoring of the codebase, all the compilation dependencies/mechanisms are identical.
Ideally we should make both the Theano-PyMC & Aesara feedstocks more reliable. I guess one should start with the Aesara one, but the same fixes can probably just be copied over to the Theano-PyMC feedstock, getting us closer to a "LTS" situation.
Do we need to add jax <=0.2.12 to the requirements, or is the test itself problematic?
AFAIK the max version requirement only applies to a subset of operations - one that's apparently covered by tests.
In my personal opinion we should remove JAX support from pymc3 <4
because it's incomplete and fragile in the medium-long term. But being on Windows I can't use JAX anyways, so pinging @twiecki for instructions.
Or is there some subset of tests which I could run which are expected to pass on a vanilla install of PyMC3?
I'm seldom running the entire suite, but if you downgrade JAX, or pass --ignore pymc3\tests\test_sampling_jax.py
all test should work.
Isn't JAX an optional dependency anyway? We also mark it as experimental so I don't see why we need to remove it after we advertised it, as it does work with the right JAX version.
JAX is an implicit dependency via theano-pymc
for python >=3.7, except on Windows.
Conda doesn't really have the concept of optional dependency.
Let's see how running the test suite in #70 goes.
(At first without removing mkl-service
.)
The failing test seems to me like a bug. Missing a version check perhaps? I'm not sure whether the bug is in PyMC3, Theano, or JAX...
Any ideas about how to solve these issues? Note that I run purely Linux, so I am unable to reproduce anything locally.
__________ ERROR collecting pymc3/tests/test_distribution_defaults.py __________
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.7/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1006: in _gcd_import
???
<frozen importlib._bootstrap>:983: in _find_and_load
???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:677: in _load_unlocked
???
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:161: in exec_module
source_stat, co = _rewrite_test(fn, self.config)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:354: in _rewrite_test
tree = ast.parse(source, filename=fn_)
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.7/ast.py:35: in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
E ValueError: source code string cannot contain null bytes
__________________ ERROR collecting pymc3/tests/test_ode.py ___________________
pymc3\tests\test_ode.py:203: in <module>
class TestErrors:
pymc3\tests\test_ode.py:211: in TestErrors
ode_model = DifferentialEquation(func=system, t0=0, times=times, n_states=1, n_theta=1)
..\_test_env\lib\site-packages\pymc3\ode\ode.py:98: in __init__
self._augmented_func = utils.augment_system(func, self.n_states, self.n_theta)
..\_test_env\lib\site-packages\pymc3\ode\utils.py:121: in augment_system
system = theano.function(
..\_test_env\lib\site-packages\theano\compile\function\__init__.py:337: in function
fn = pfunc(
..\_test_env\lib\site-packages\theano\compile\function\pfunc.py:524: in pfunc
return orig_function(
..\_test_env\lib\site-packages\theano\compile\function\types.py:1981: in orig_function
fn = m.create(defaults)
..\_test_env\lib\site-packages\theano\compile\function\types.py:1836: in create
_fn, _i, _o = self.linker.make_thunk(
..\_test_env\lib\site-packages\theano\link\basic.py:266: in make_thunk
return self.make_all(
..\_test_env\lib\site-packages\theano\link\vm.py:1131: in make_all
node.op.make_thunk(node, storage_map, compute_map, [], impl=impl)
..\_test_env\lib\site-packages\theano\graph\op.py:634: in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
..\_test_env\lib\site-packages\theano\graph\op.py:600: in make_c_thunk
outputs = cl.make_thunk(
..\_test_env\lib\site-packages\theano\link\c\basic.py:1203: in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
..\_test_env\lib\site-packages\theano\link\c\basic.py:1138: in __compile__
thunk, module = self.cthunk_factory(
..\_test_env\lib\site-packages\theano\link\c\basic.py:1634: in cthunk_factory
module = get_module_cache().module_from_key(key=key, lnk=self)
..\_test_env\lib\site-packages\theano\link\c\cmodule.py:1191: in module_from_key
module = lnk.compile_cmodule(location)
..\_test_env\lib\site-packages\theano\link\c\basic.py:1543: in compile_cmodule
module = c_compiler.compile_str(
..\_test_env\lib\site-packages\theano\link\c\cmodule.py:2546: in compile_str
raise Exception(
E Exception: ('The following error happened while compiling the node', InplaceDimShuffle{x,0}(dydp), '\n', "Compilation failed (return status=1): C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:466: undefined reference to `__imp__Py_NoneStruct'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:121: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_inplace(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:145: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:250: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:193: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `instantiate':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:728: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:166: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:223: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:94: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:467: undefined reference to `__imp_PyExc_ValueError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:480: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:499: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:258: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:129: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:201: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:162: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:90: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:219: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:472: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `cpu_dimshuffle_node_m81c5df0002fa670d904e4582c16560d8072302e3c3fef56e3dd38fcd0315ef5f_0(tagPyArrayObject*, tagPyArrayObject**, _Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:320: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:316: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:330: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `run':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:550: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:657: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_Py_INCREF':\r. D:/bld/pymc3_1624642290531/_test_env/include/object.h:408: undefined reference to `__imp__Py_NoneStruct'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `run':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:663: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:692: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:694: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:693: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:590: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_import_array':\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1480: undefined reference to `__imp_PyCapsule_Type'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1481: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `PyInit_m81c5df0002fa670d904e4582c16560d8072302e3c3fef56e3dd38fcd0315ef5f':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_79_Stepping_1_GenuineIntel-3.9.5-64/tmpbcp23oe2/mod.cpp:761: undefined reference to `__imp_PyExc_ImportError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccbiehV7.o: In function `_import_array':\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1512: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1496: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1502: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1524: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1476: undefined reference to `__imp_PyExc_AttributeError'\r. D:/bld/pymc3_1624642290531/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1488: undefined reference to `__imp_PyExc_RuntimeError'\r. collect2.exe: error: ld returned 1 exit status\r. ", 'FunctionGraph(InplaceDimShuffle{x,0}(dydp))')
I've never seen either of them before. Most likely an issue with the installed dependencies.. I'll see if I can run tests locally on Windows with 3.11.2 some time later today.
Update:
After disabling the graphviz tests (all good, since graphviz is not a strict dependency, and the warning gives good installation instructions), the test suite now passes on Linux. :heavy_check_mark:
The Windows error which I mentioned above seems to be concurrent with the following error:
ERROR (theano.graph.opt): Optimization failure due to: constant_folding
ERROR (theano.graph.opt): node: InplaceDimShuffle{x}(TensorConstant{0.0})
ERROR (theano.graph.opt): TRACEBACK:
ERROR (theano.graph.opt): Traceback (most recent call last):
File "%PREFIX%\lib\site-packages\theano\graph\opt.py", line 2017, in process_node
replacements = lopt.transform(fgraph, node)
File "%PREFIX%\lib\site-packages\theano\graph\opt.py", line 1209, in transform
return self.fn(*args, **kwargs)
File "%PREFIX%\lib\site-packages\theano\tensor\opt.py", line 7007, in constant_folding
node, storage_map, compute_map, no_recycling=[], impl=impl
File "%PREFIX%\lib\site-packages\theano\graph\op.py", line 634, in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
File "%PREFIX%\lib\site-packages\theano\graph\op.py", line 601, in make_c_thunk
input_storage=node_input_storage, output_storage=node_output_storage
File "%PREFIX%\lib\site-packages\theano\link\c\basic.py", line 1204, in make_thunk
input_storage, output_storage, storage_map
File "%PREFIX%\lib\site-packages\theano\link\c\basic.py", line 1142, in __compile__
storage_map,
File "%PREFIX%\lib\site-packages\theano\link\c\basic.py", line 1634, in cthunk_factory
module = get_module_cache().module_from_key(key=key, lnk=self)
File "%PREFIX%\lib\site-packages\theano\link\c\cmodule.py", line 1191, in module_from_key
module = lnk.compile_cmodule(location)
File "%PREFIX%\lib\site-packages\theano\link\c\basic.py", line 1550, in compile_cmodule
preargs=preargs,
File "%PREFIX%\lib\site-packages\theano\link\c\cmodule.py", line 2547, in compile_str
f"Compilation failed (return status={status}): {compile_stderr}"
Exception: ("Compilation failed (return status=1): C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:466: undefined reference to `__imp__Py_NoneStruct'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:121: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_inplace(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:145: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:250: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:193: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `instantiate':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:728: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:166: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:223: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:94: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:467: undefined reference to `__imp_PyExc_ValueError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:480: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:499: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:129: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:258: undefined reference to `__imp_PyExc_TypeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_input_broadcastable(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:201: undefined reference to `__imp_PyExc_TypeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:162: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract_transposition(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:219: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3::extract__new_order(_object*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:90: undefined reference to `__imp_PyExc_ValueError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `init':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:472: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `cpu_dimshuffle_node_m81c5df0002fa670d904e4582c16560d8072302e3c3fef56e3dd38fcd0315ef5f_0(tagPyArrayObject*, tagPyArrayObject**, _Params_7049f0075c13cb114b9effe8a4d9a4a50c4002ea6e75b2b1d5dc3ece12566bea_a8608772399dd1b12a4827de9d9385416d20eb45d5baeb89bce0ad52d349ceb3*)':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:320: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:316: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:330: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `run':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:550: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:657: undefined reference to `__imp_PyExc_NotImplementedError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:628: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:663: undefined reference to `__imp_PyExc_RuntimeError'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:694: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:693: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:692: undefined reference to `__imp__Py_NoneStruct'\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:590: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_import_array':\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1480: undefined reference to `__imp_PyCapsule_Type'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1481: undefined reference to `__imp_PyExc_RuntimeError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `PyInit_m81c5df0002fa670d904e4582c16560d8072302e3c3fef56e3dd38fcd0315ef5f':\r. C:/Users/VssAdministrator/AppData/Local/Theano/compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_85_Stepping_4_GenuineIntel-3.7.10-64/tmppv3e8f9v/mod.cpp:761: undefined reference to `__imp_PyExc_ImportError'\r. C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\ccIHq4mt.o: In function `_import_array':\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1512: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1496: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1502: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1524: undefined reference to `__imp_PyExc_RuntimeError'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1476: undefined reference to `__imp_PyExc_AttributeError'\r. D:/bld/pymc3_1624656883202/_test_env/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1488: undefined reference to `__imp_PyExc_RuntimeError'\r. collect2.exe: error: ld returned 1 exit status\r. ", 'FunctionGraph(InplaceDimShuffle{x}(TensorConstant{0.0}))')
The previously reported error on OSX seems to have been transient. But now there are failures on all python versions with this message:
_____________________ test_spawn_densitydist_mpctxwarning ______________________
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ff2c6b1ee50>
def test_spawn_densitydist_mpctxwarning(monkeypatch):
ctx = multiprocessing.get_context("spawn")
monkeypatch.setattr(multiprocessing, "get_context", lambda: ctx)
with pm.Model() as model:
mu = pm.Normal("mu", 0, 1)
normal_dist = pm.Normal.dist(mu, 1)
with pytest.warns(UserWarning, match="errors when sampling when multiprocessing"):
> obs = pm.DensityDist("density_dist", normal_dist.logp, observed=np.random.randn(100))
E Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) matching ('errors when sampling when multiprocessing') was emitted. The list of emitted warnings is: [UserWarning('You are passing a bound method as logp for DensityDist, this can lead to errors when sampling on platforms other than Linux. Consider using a plain function instead, or subclass Distribution.')].
pymc3/tests/test_parallel_sampling.py:204: Failed
It seems to me likely that the warning text changed slightly, and now the test needs to be updated?
I look forward to seeing what you come up with on Windows.
Before running without mkl-service I want to get the test summary with the recommended install procedure.
My steps:
conda create -n pm3v3 -c conda-forge "python=3.8" libpython mkl-service m2w64-toolchain numba python-graphviz scipy
as described in the Installation Guide for Windowspip install -e .
on the repo at latest v3
.pytest -sv pymc3\tests\test_ode.py
(20/20 passed)pytest -sv --ignore pymc3\tests\test_sampling_jax.py
ran into a few errors, but did not run through, because of a reproducible stack overflow in pymc3/tests/test_parallel_sampling.py::test_spawn_densitydist_bound_method
pytest -sv --ignore pymc3/tests/test_sampling_jax.py --ignore pymc3/tests/test_parallel_sampling.py
============ short test summary info
FAILED pymc3/tests/test_bart.py::test_model - AttributeError: Can't pickle local object 'BaseBART.__init__.<locals>.<lambda>'
FAILED pymc3/tests/test_sampling.py::TestSample::test_trace_report_bart - AttributeError: Can't pickle local object 'BaseBART.__init__.<locals>.<lambda>'
FAILED pymc3/tests/test_types.py::TestType::test_float32 - RuntimeError: Chain 0 failed.
FAILED pymc3/tests/test_types.py::TestType::test_float32_MLDA - RuntimeError: Chain 0 failed.
============ 4 failed, 4731 passed, 18 skipped, 28 xfailed, 72 xpassed, 125132 warnings in 4346.69s (1:12:26)
mkl-service
). Not looking very promising:
(pm3v3nomklservice) C:\Users\osthege\Repos\pymc3-dev>python -c "import pymc3;print(pymc3.__version__)"
WARNING (theano.link.c.cmodule): install mkl with `conda install mkl-service`: No module named 'mkl'
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
3.11.2
============ short test summary info
FAILED pymc3/tests/test_bart.py::test_model - AttributeError: Can't pickle local object 'BaseBART.__init__.<locals>.<lambda>'
FAILED pymc3/tests/test_distributions.py::TestMatchesScipy::test_kroneckernormal[None-3-2] - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\cccz3Fck.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledi...FAILED pymc3/tests/test_distributions.py::TestMatchesScipy::test_kroneckernormal[None-3-3] - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\cc1cY81X.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledi...FAILED pymc3/tests/test_distributions.py::TestMatchesScipy::test_kroneckernormal[1.0-3-2] - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccLg8Eap.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir...FAILED pymc3/tests/test_distributions.py::TestMatchesScipy::test_kroneckernormal[1.0-3-3] - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccNTCk38.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_poisson - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but the percent diff...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_negative_binomial - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but the pe...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_geometric - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but the percent di...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_categorical_random[4] - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but th...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_kronecker_normal - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccEEAaBq.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/c...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_dirichlet_multinomial - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but th...FAILED pymc3/tests/test_distributions_random.py::TestScalarParameterSamples::test_multinomial - ValueError: For each axis slice, the sum of the observed frequencies must agree with the sum of the expected frequencies to a relative tolerance of 1e-08, but the percent ...FAILED pymc3/tests/test_gp.py::TestMarginalKron::testMarginalKronvsMarginalpredict - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\cc5HOVlr.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Window...FAILED pymc3/tests/test_gp.py::TestMarginalKron::testMarginalKronvsMarginal - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccP51wnp.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Windows-10-10...FAILED pymc3/tests/test_sampling.py::TestSample::test_trace_report_bart - AttributeError: Can't pickle local object 'BaseBART.__init__.<locals>.<lambda>'
FAILED pymc3/tests/test_types.py::TestType::test_float32 - RuntimeError: Chain 0 failed.
FAILED pymc3/tests/test_types.py::TestType::test_float32_MLDA - RuntimeError: Chain 0 failed.
FAILED pymc3/tests/test_variational_inference.py::test_sample_aevb[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation failed (return status=1...FAILED pymc3/tests/test_variational_inference.py::test_sample_aevb[NormalizingFlowGroup: {'flow': 'hh'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Composite{(i0 - ((i1 * i2 * i3) / i4))}}.0)...FAILED pymc3/tests/test_variational_inference.py::test_sample_aevb[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Cast{float64}}.0), '\n', "Compilation f...FAILED pymc3/tests/test_variational_inference.py::test_replacements_in_sample_node_aevb[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation fa...FAILED pymc3/tests/test_variational_inference.py::test_replacements_in_sample_node_aevb[NormalizingFlowGroup: {'flow': 'hh'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Composite{(i0 - ((i1 *...FAILED pymc3/tests/test_variational_inference.py::test_replacements_in_sample_node_aevb[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Cast{float64}}.0),...FAILED pymc3/tests/test_variational_inference.py::test_logq_mini_sample_aevb[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation failed (retur...FAILED pymc3/tests/test_variational_inference.py::test_logq_mini_sample_aevb[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Cast{float64}}.0), '\n', "Com...FAILED pymc3/tests/test_variational_inference.py::test_logq_aevb[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation failed (return status=1):...FAILED pymc3/tests/test_variational_inference.py::test_logq_aevb[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Cast{float64}}.0), '\n', "Compilation fai...FAILED pymc3/tests/test_variational_inference.py::test_rowwise_approx[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation failed (return statu...FAILED pymc3/tests/test_variational_inference.py::test_rowwise_approx[NormalizingFlowGroup: {'flow': 'hh'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Composite{(i0 - ((i1 * i2 * i3) / i4))}}...FAILED pymc3/tests/test_variational_inference.py::test_rowwise_approx[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, w), '\n', "Compilation failed (return status=...FAILED pymc3/tests/test_variational_inference.py::test_pickle_approx_aevb[FullRankGroup: {}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, InplaceDimShuffle{2,1,0}.0), '\n', "Compilation failed (return s...FAILED pymc3/tests/test_variational_inference.py::test_pickle_approx_aevb[NormalizingFlowGroup: {'flow': 'hh'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Composite{(i0 - ((i1 * i2 * i3) / i4...FAILED pymc3/tests/test_variational_inference.py::test_pickle_approx_aevb[NormalizingFlowGroup: {'flow': 'planar'}] - Exception: ('The following error happened while compiling the node', BatchedDot(InplaceDimShuffle{1,0,2}.0, Elemwise{Cast{float64}}.0), '\n', "Compil...FAILED pymc3/tests/test_variational_inference.py::test_flow_det_local[PlanarFlow] - Exception: ('The following error happened while compiling the node', BatchedDot(TensorConstant{[[[ 0. 1...10. 11.]]]}, TensorConstant{[[ 0.24196..4247482 ]]}), '\n', "Compilation fai...FAILED pymc3/tests/test_variational_inference.py::test_flow_det_local[HouseholderFlow] - Exception: ('The following error happened while compiling the node', BatchedDot(TensorConstant{[[[ 0. 1...10. 11.]]]}, TensorConstant{[[[ 0.9309..3927584]]]}), '\n', "Compilatio...ERROR pymc3/tests/test_distributions.py::TestStrAndLatexRepr::test__repr_latex_ - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccowZ1rb.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Windows-1...ERROR pymc3/tests/test_distributions.py::TestStrAndLatexRepr::test___latex__ - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccowZ1rb.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Windows-10-1...ERROR pymc3/tests/test_distributions.py::TestStrAndLatexRepr::test___str__ - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccowZ1rb.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Windows-10-10....ERROR pymc3/tests/test_distributions.py::TestStrAndLatexRepr::test_str - Exception: ("Compilation failed (return status=1): C:\\Users\\osthege\\AppData\\Local\\Temp\\ccowZ1rb.o: In function `run':\r. C:/Users/osthege/AppData/Local/Theano/compiledir_Windows-10-10.0.19...
============ 35 failed, 4696 passed, 18 skipped, 28 xfailed, 72 xpassed, 120438 warnings, 4 errors in 8436.41s (2:20:36)
I won't be at the computer again until late in the evening, but I'll post the full test summary as soon as I have one.
@michaelosthege I'm sorry, this is embarrassing...
After adding m2w64-toolchain
on this feedstock, I forgot to pull master on my fork before creating the branch for #70 where I am conducting the CI tests for Windows. As a result, it looks like m2w64-toolchain
was not installed. :man_facepalming:
On my fork I just pulled master and merged it into my branch, so we'll see in a few hours if the tests complete in Windows.
Sorry about that!
@michaelosthege, even with m2w64-toolchain the result is the same. (See #70.)
@maresb see above. Doesn't look like we can easily remove mkl-service
Thanks @michaelosthege for the test results!!
Yes, I agree that it looks like for Windows we won't be able to remove mkl-service
, and also perhaps also in the other builds.
Do you have any ideas about the failures in the tests which run on conda-forge CI? (#70) Namely this test_ode.py
failure in Windows? I'll try adding libpython
to see if that helps...
Adding libpython
fixed the test_ode.py
failure!!! :tada:
We'll see in a few hours if the rest succeeds...
Interesting... Windows with Python 3.8 is still running tests. Most of the tests have passed, but there are a few failures.
On the other hand, Windows with Python 3.7 or Python 3.9 make it to the tests, but the tests fail rather catastrophically.
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=343481
Any ideas on why the behavior of Python 3.8 is so different from the other versions under Windows?
Any ideas on why the behavior of Python 3.8 is so different from the other versions under Windows?
@maresb which CI run are you referring to?
The CI on pymc3/main
uses a Windows-specific environment.yml
and runs only for one Python version. The environment.yml
files used by the Ubuntu job are specific to different Python-versions (see https://github.com/pymc-devs/pymc3/issues/4786). Maybe the tests you're referring to also run with environments that differ in more than the Python version?
I am and always have been referring to the conda-forge CI environment.
In #70, I modified the meta.yaml to run the test suite. This should simulate what happens when someone with a fresh environment does mamba install pymc3
and then runs the PyMC3 pytest test suite. The conda-forge CI runs 9 cases: (py3.7, py3.8, py3.9)×(win, mac, linux). If this feedstock is set up correctly, then everything should just work, and this is what I'm trying to test.
For the results, please see:
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=343481
(For this run, please ignore everything except Windows; I put in libpython without a [win]
specifier, so all the non-Windows builds failed.)
Thanks for the link to your issue, it seems like quite a rabbit hole. If I understand correctly, then the correct place to look for ideas on getting things to work is probably here on the v3
branch in the conda-envs
directory?
If we get this feedstock sorted out, then the (non-developer) installation instructions for all platforms and all Python versions would simply be mamba install pymc3
, plus optional stuff like graphviz, do you agree?
Is h5py somehow a base requirement, or is it optional?
If I understand correctly, then the correct place to look for ideas on getting things to work is probably here on the v3 branch in the conda-envs directory?
Yes.
Is h5py somehow a base requirement, or is it optional?
When working on https://github.com/pymc-devs/pymc3/commit/576a733ffeccba7ade9bbacd6e5201f515c0dc9e I initially removed it, but eventually put it back in.
At least on main
it does not show up anywhere in the code so it's probably worth a shot to remove it.
If we get this feedstock sorted out, then the (non-developer) installation instructions for all platforms and all Python versions would simply be mamba install pymc3, plus optional stuff like graphviz, do you agree?
It would be even better to sort out the dependencies at the backend level (theano-pymc or aesara), because then the instructions could simplify to something like:
# basic
conda install -c conda-forge pymc3
# premium
conda install -c conda-forge python-graphviz pymc3
# developer
conda install -c conda-forge python-graphviz aesara
git clone https://github.com/pymc-devs/pymc3 pymc3-dev
pip install -e pymc3-dev
I ran
conda remove --force mkl mkl-service
and PyMC3 seemed to still work fine. Is it still a requirement?It's quite large, so it would be nice to get rid of.