pymc-devs / pymc-devs/pytensor

BLAS warnings in new github windows CI

Open
#1,625 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug installation maintenance
Dominant language
Python
Stars
644
Forks
208
Avg merge
2d 14h
Merged PRs (30d)
16

Description

Description

We're seeing BLAS warnings in the windows CI for pymc-extras. There are two. One is the usual linker failure:

CI log snippet
2025-09-28T18:44:42.2527549Z ERROR    pytensor.graph.rewriting.basic:basic.py:1757 Rewrite failure due to: e(Sub, ~z, e(Mul, ~alpha [<function <lambda> at 0x000001779D4AA980>], e(SparseDot, ~x, ~y))) -> e(Usmm{no_inplace}, e(Neg, ~alpha [<function <lambda> at 0x000001779D4AA980>]), ~x, ~y, ~z)
2025-09-28T18:44:42.2528530Z ERROR    pytensor.graph.rewriting.basic:basic.py:1758 node: Sub(Add.0, Mul.0)
2025-09-28T18:44:42.2529036Z ERROR    pytensor.graph.rewriting.basic:basic.py:1759 TRACEBACK:
2025-09-28T18:44:42.2529579Z ERROR    pytensor.graph.rewriting.basic:basic.py:1760 Traceback (most recent call last):
2025-09-28T18:44:42.2530256Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 300, in fetch_val_for_key
2025-09-28T18:44:42.2530800Z     return self._pytensor_cfg.get(section, option)
2025-09-28T18:44:42.2531049Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2531431Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 759, in get
2025-09-28T18:44:42.2531824Z     d = self._unify_values(section, vars)
2025-09-28T18:44:42.2532039Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2532446Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 1132, in _unify_values
2025-09-28T18:44:42.2532876Z     raise NoSectionError(section) from None
2025-09-28T18:44:42.2533138Z configparser.NoSectionError: No section: 'blas'
2025-09-28T18:44:42.2533323Z 
2025-09-28T18:44:42.2533475Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2533706Z 
2025-09-28T18:44:42.2533784Z Traceback (most recent call last):
2025-09-28T18:44:42.2534249Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 415, in __get__
2025-09-28T18:44:42.2534794Z     val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
2025-09-28T18:44:42.2535078Z               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2535581Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 304, in fetch_val_for_key
2025-09-28T18:44:42.2536074Z     raise KeyError(key)
2025-09-28T18:44:42.2536251Z KeyError: 'blas__ldflags'
2025-09-28T18:44:42.2536466Z 
2025-09-28T18:44:42.2536618Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2536846Z 
2025-09-28T18:44:42.2536920Z Traceback (most recent call last):
2025-09-28T18:44:42.2537433Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1922, in process_node
2025-09-28T18:44:42.2538000Z     replacements = node_rewriter.transform(fgraph, node)
2025-09-28T18:44:42.2538264Z                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2538763Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1633, in transform
2025-09-28T18:44:42.2539276Z     s = unify(self.in_pattern, node.out)
2025-09-28T18:44:42.2539486Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2539959Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2540458Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2540648Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2541492Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 254, in unify_NoMap
2025-09-28T18:44:42.2541971Z     return unify(u, v, {})
2025-09-28T18:44:42.2542249Z            ^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2542712Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2543203Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2543392Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2543815Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 249, in unify
2025-09-28T18:44:42.2544270Z     return stream_eval(_unify(u, v, s))
2025-09-28T18:44:42.2544475Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2544919Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 45, in stream_eval
2025-09-28T18:44:42.2545379Z     z_out = z.send(z_args)
2025-09-28T18:44:42.2545547Z             ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2546064Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\unify.py", line 245, in _unify_ConstrainedVar_object
2025-09-28T18:44:42.2546649Z     and not v_w.constraint(eval_if_etuple(u_w))
2025-09-28T18:44:42.2546880Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2547349Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\sparse\rewriting.py", line 918, in <lambda>
2025-09-28T18:44:42.2547889Z     all(s == 1 for s in expr.type.shape) and config.blas__ldflags
2025-09-28T18:44:42.2548161Z                                              ^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2548628Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 419, in __get__
2025-09-28T18:44:42.2549104Z     val_str = self.default()
2025-09-28T18:44:42.2549285Z               ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2549766Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\link\c\cmodule.py", line 2968, in default_blas_ldflags
2025-09-28T18:44:42.2550275Z     warnings.warn(
2025-09-28T18:44:42.2550701Z UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
2025-09-28T18:44:42.2551386Z This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
2025-09-28T18:44:42.2552327Z Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
2025-09-28T18:44:42.2553361Z For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library
2025-09-28T18:44:42.2553906Z 
2025-09-28T18:44:42.2554733Z ERROR    pytensor.graph.rewriting.basic:basic.py:1757 Rewrite failure due to: e(Sub, ~z, e(Mul, ~alpha [<function <lambda> at 0x000001779D4AA980>], e(SparseDot, ~x, ~y))) -> e(Usmm{no_inplace}, e(Neg, ~alpha [<function <lambda> at 0x000001779D4AA980>]), ~x, ~y, ~z)
2025-09-28T18:44:42.2555713Z ERROR    pytensor.graph.rewriting.basic:basic.py:1758 node: Sub(Add.0, Mul.0)
2025-09-28T18:44:42.2556212Z ERROR    pytensor.graph.rewriting.basic:basic.py:1759 TRACEBACK:
2025-09-28T18:44:42.2556750Z ERROR    pytensor.graph.rewriting.basic:basic.py:1760 Traceback (most recent call last):
2025-09-28T18:44:42.2557423Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 300, in fetch_val_for_key
2025-09-28T18:44:42.2557959Z     return self._pytensor_cfg.get(section, option)
2025-09-28T18:44:42.2558207Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2558911Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 759, in get
2025-09-28T18:44:42.2559358Z     d = self._unify_values(section, vars)
2025-09-28T18:44:42.2559686Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2560106Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 1132, in _unify_values
2025-09-28T18:44:42.2560577Z     raise NoSectionError(section) from None
2025-09-28T18:44:42.2560835Z configparser.NoSectionError: No section: 'blas'
2025-09-28T18:44:42.2561020Z 
2025-09-28T18:44:42.2561173Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2561403Z 
2025-09-28T18:44:42.2561486Z Traceback (most recent call last):
2025-09-28T18:44:42.2561947Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 415, in __get__
2025-09-28T18:44:42.2562496Z     val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
2025-09-28T18:44:42.2562781Z               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2563291Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 304, in fetch_val_for_key
2025-09-28T18:44:42.2563785Z     raise KeyError(key)
2025-09-28T18:44:42.2563966Z KeyError: 'blas__ldflags'
2025-09-28T18:44:42.2564081Z 
2025-09-28T18:44:42.2564236Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2564464Z 
2025-09-28T18:44:42.2564545Z Traceback (most recent call last):
2025-09-28T18:44:42.2565049Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1922, in process_node
2025-09-28T18:44:42.2565617Z     replacements = node_rewriter.transform(fgraph, node)
2025-09-28T18:44:42.2565888Z                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2566388Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1633, in transform
2025-09-28T18:44:42.2566908Z     s = unify(self.in_pattern, node.out)
2025-09-28T18:44:42.2567125Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2567608Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2568100Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2568292Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2568729Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 254, in unify_NoMap
2025-09-28T18:44:42.2569183Z     return unify(u, v, {})
2025-09-28T18:44:42.2569354Z            ^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2569801Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2570379Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2570557Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2570971Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 249, in unify
2025-09-28T18:44:42.2571423Z     return stream_eval(_unify(u, v, s))
2025-09-28T18:44:42.2571625Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2572064Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 45, in stream_eval
2025-09-28T18:44:42.2572515Z     z_out = z.send(z_args)
2025-09-28T18:44:42.2572678Z             ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2573192Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\unify.py", line 245, in _unify_ConstrainedVar_object
2025-09-28T18:44:42.2573770Z     and not v_w.constraint(eval_if_etuple(u_w))
2025-09-28T18:44:42.2574006Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2574476Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\sparse\rewriting.py", line 918, in <lambda>
2025-09-28T18:44:42.2575012Z     all(s == 1 for s in expr.type.shape) and config.blas__ldflags
2025-09-28T18:44:42.2575355Z                                              ^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2575835Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 419, in __get__
2025-09-28T18:44:42.2576300Z     val_str = self.default()
2025-09-28T18:44:42.2576479Z               ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2576958Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\link\c\cmodule.py", line 2968, in default_blas_ldflags
2025-09-28T18:44:42.2577460Z     warnings.warn(
2025-09-28T18:44:42.2577879Z UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
2025-09-28T18:44:42.2578567Z This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
2025-09-28T18:44:42.2579806Z Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
2025-09-28T18:44:42.2580844Z For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library
2025-09-28T18:44:42.2581316Z 
2025-09-28T18:44:42.2582129Z ERROR    pytensor.graph.rewriting.basic:basic.py:1757 Rewrite failure due to: e(Sub, ~z, e(Mul, ~alpha [<function <lambda> at 0x000001779D4AA980>], e(SparseDot, ~x, ~y))) -> e(Usmm{no_inplace}, e(Neg, ~alpha [<function <lambda> at 0x000001779D4AA980>]), ~x, ~y, ~z)
2025-09-28T18:44:42.2583103Z ERROR    pytensor.graph.rewriting.basic:basic.py:1758 node: Sub(Add.0, Mul.0)
2025-09-28T18:44:42.2583601Z ERROR    pytensor.graph.rewriting.basic:basic.py:1759 TRACEBACK:
2025-09-28T18:44:42.2584135Z ERROR    pytensor.graph.rewriting.basic:basic.py:1760 Traceback (most recent call last):
2025-09-28T18:44:42.2584803Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 300, in fetch_val_for_key
2025-09-28T18:44:42.2585345Z     return self._pytensor_cfg.get(section, option)
2025-09-28T18:44:42.2585593Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2585961Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 759, in get
2025-09-28T18:44:42.2586361Z     d = self._unify_values(section, vars)
2025-09-28T18:44:42.2586579Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2586982Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 1132, in _unify_values
2025-09-28T18:44:42.2587527Z     raise NoSectionError(section) from None
2025-09-28T18:44:42.2587789Z configparser.NoSectionError: No section: 'blas'
2025-09-28T18:44:42.2587970Z 
2025-09-28T18:44:42.2588128Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2588358Z 
2025-09-28T18:44:42.2588447Z Traceback (most recent call last):
2025-09-28T18:44:42.2588905Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 415, in __get__
2025-09-28T18:44:42.2589441Z     val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
2025-09-28T18:44:42.2589726Z               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2590223Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 304, in fetch_val_for_key
2025-09-28T18:44:42.2590723Z     raise KeyError(key)
2025-09-28T18:44:42.2590908Z KeyError: 'blas__ldflags'
2025-09-28T18:44:42.2591025Z 
2025-09-28T18:44:42.2591179Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2591406Z 
2025-09-28T18:44:42.2591477Z Traceback (most recent call last):
2025-09-28T18:44:42.2592057Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1922, in process_node
2025-09-28T18:44:42.2592622Z     replacements = node_rewriter.transform(fgraph, node)
2025-09-28T18:44:42.2592879Z                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2593383Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1633, in transform
2025-09-28T18:44:42.2593893Z     s = unify(self.in_pattern, node.out)
2025-09-28T18:44:42.2594103Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2594578Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2595072Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2595262Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2595693Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 254, in unify_NoMap
2025-09-28T18:44:42.2596160Z     return unify(u, v, {})
2025-09-28T18:44:42.2596332Z            ^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2596780Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2597266Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2597449Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2597861Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 249, in unify
2025-09-28T18:44:42.2598306Z     return stream_eval(_unify(u, v, s))
2025-09-28T18:44:42.2598511Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2599291Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 45, in stream_eval
2025-09-28T18:44:42.2599758Z     z_out = z.send(z_args)
2025-09-28T18:44:42.2599936Z             ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2600456Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\unify.py", line 245, in _unify_ConstrainedVar_object
2025-09-28T18:44:42.2601043Z     and not v_w.constraint(eval_if_etuple(u_w))
2025-09-28T18:44:42.2601276Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2601758Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\sparse\rewriting.py", line 918, in <lambda>
2025-09-28T18:44:42.2602292Z     all(s == 1 for s in expr.type.shape) and config.blas__ldflags
2025-09-28T18:44:42.2602564Z                                              ^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2603042Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 419, in __get__
2025-09-28T18:44:42.2603617Z     val_str = self.default()
2025-09-28T18:44:42.2603799Z               ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2604285Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\link\c\cmodule.py", line 2968, in default_blas_ldflags
2025-09-28T18:44:42.2604794Z     warnings.warn(
2025-09-28T18:44:42.2605215Z UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
2025-09-28T18:44:42.2605897Z This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
2025-09-28T18:44:42.2606835Z Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
2025-09-28T18:44:42.2607872Z For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library
2025-09-28T18:44:42.2608337Z 
2025-09-28T18:44:42.2609221Z ERROR    pytensor.graph.rewriting.basic:basic.py:1757 Rewrite failure due to: e(Sub, ~z, e(Mul, ~alpha [<function <lambda> at 0x000001779D4AA980>], e(SparseDot, ~x, ~y))) -> e(Usmm{no_inplace}, e(Neg, ~alpha [<function <lambda> at 0x000001779D4AA980>]), ~x, ~y, ~z)
2025-09-28T18:44:42.2610203Z ERROR    pytensor.graph.rewriting.basic:basic.py:1758 node: Sub(Add.0, Mul.0)
2025-09-28T18:44:42.2610695Z ERROR    pytensor.graph.rewriting.basic:basic.py:1759 TRACEBACK:
2025-09-28T18:44:42.2611231Z ERROR    pytensor.graph.rewriting.basic:basic.py:1760 Traceback (most recent call last):
2025-09-28T18:44:42.2611895Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 300, in fetch_val_for_key
2025-09-28T18:44:42.2612430Z     return self._pytensor_cfg.get(section, option)
2025-09-28T18:44:42.2612673Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2613045Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 759, in get
2025-09-28T18:44:42.2613434Z     d = self._unify_values(section, vars)
2025-09-28T18:44:42.2613655Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2614062Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\configparser.py", line 1132, in _unify_values
2025-09-28T18:44:42.2614494Z     raise NoSectionError(section) from None
2025-09-28T18:44:42.2614762Z configparser.NoSectionError: No section: 'blas'
2025-09-28T18:44:42.2614949Z 
2025-09-28T18:44:42.2615103Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2615336Z 
2025-09-28T18:44:42.2615415Z Traceback (most recent call last):
2025-09-28T18:44:42.2615873Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 415, in __get__
2025-09-28T18:44:42.2616411Z     val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
2025-09-28T18:44:42.2616698Z               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2617211Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 304, in fetch_val_for_key
2025-09-28T18:44:42.2617700Z     raise KeyError(key)
2025-09-28T18:44:42.2617879Z KeyError: 'blas__ldflags'
2025-09-28T18:44:42.2617993Z 
2025-09-28T18:44:42.2618145Z During handling of the above exception, another exception occurred:
2025-09-28T18:44:42.2618438Z 
2025-09-28T18:44:42.2618547Z Traceback (most recent call last):
2025-09-28T18:44:42.2619443Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1922, in process_node
2025-09-28T18:44:42.2620021Z     replacements = node_rewriter.transform(fgraph, node)
2025-09-28T18:44:42.2620415Z                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2620919Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\basic.py", line 1633, in transform
2025-09-28T18:44:42.2621438Z     s = unify(self.in_pattern, node.out)
2025-09-28T18:44:42.2621659Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2622140Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2622641Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2622835Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2623277Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 254, in unify_NoMap
2025-09-28T18:44:42.2623744Z     return unify(u, v, {})
2025-09-28T18:44:42.2623927Z            ^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2624382Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
2025-09-28T18:44:42.2624873Z     return func(*args, **kwargs)
2025-09-28T18:44:42.2625061Z            ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2625552Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 249, in unify
2025-09-28T18:44:42.2626012Z     return stream_eval(_unify(u, v, s))
2025-09-28T18:44:42.2626217Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2626665Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\unification\core.py", line 45, in stream_eval
2025-09-28T18:44:42.2627121Z     z_out = z.send(z_args)
2025-09-28T18:44:42.2627291Z             ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2627806Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\graph\rewriting\unify.py", line 245, in _unify_ConstrainedVar_object
2025-09-28T18:44:42.2628392Z     and not v_w.constraint(eval_if_etuple(u_w))
2025-09-28T18:44:42.2628625Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2629099Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\sparse\rewriting.py", line 918, in <lambda>
2025-09-28T18:44:42.2629641Z     all(s == 1 for s in expr.type.shape) and config.blas__ldflags
2025-09-28T18:44:42.2629912Z                                              ^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:44:42.2630385Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\configparser.py", line 419, in __get__
2025-09-28T18:44:42.2630857Z     val_str = self.default()
2025-09-28T18:44:42.2631038Z               ^^^^^^^^^^^^^^
2025-09-28T18:44:42.2631523Z   File "C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pytensor\link\c\cmodule.py", line 2968, in default_blas_ldflags
2025-09-28T18:44:42.2632027Z     warnings.warn(
2025-09-28T18:44:42.2632453Z UserWarning: PyTensor could not link to a BLAS installation. Operations that might benefit from BLAS will be severely degraded.
2025-09-28T18:44:42.2633139Z This usually happens when PyTensor is installed via pip. We recommend it be installed via conda/mamba/pixi instead.
2025-09-28T18:44:42.2634085Z Alternatively, you can use an experimental backend such as Numba or JAX that perform their own BLAS optimizations, by setting `pytensor.config.mode == 'NUMBA'` or passing `mode='NUMBA'` when compiling a PyTensor function.
2025-09-28T18:44:42.2635116Z For more options and details see https://pytensor.readthedocs.io/en/latest/troubleshooting.html#how-do-i-configure-test-my-blas-library

And one is a bit more exotic (to me) -- too much linking!

CI log snippet
2025-09-28T18:48:33.6073457Z __________________________ test_pipeline_integration __________________________
2025-09-28T18:48:33.6073913Z 
2025-09-28T18:48:33.6074280Z toy_X =        input
2025-09-28T18:48:33.6074553Z 0   0.000000
2025-09-28T18:48:33.6074787Z 1   0.010101
2025-09-28T18:48:33.6075020Z 2   0.020202
2025-09-28T18:48:33.6075239Z 3   0.030303
2025-09-28T18:48:33.6075473Z 4   0.040404
2025-09-28T18:48:33.6075706Z ..       ...
2025-09-28T18:48:33.6075922Z 95  0.959596
2025-09-28T18:48:33.6076152Z 96  0.969697
2025-09-28T18:48:33.6076377Z 97  0.979798
2025-09-28T18:48:33.6076598Z 98  0.989899
2025-09-28T18:48:33.6076828Z 99  1.000000
2025-09-28T18:48:33.6076970Z 
2025-09-28T18:48:33.6077076Z [100 rows x 1 columns]
2025-09-28T18:48:33.6077351Z toy_y = 0     3.195543
2025-09-28T18:48:33.6077616Z 1     1.751821
2025-09-28T18:48:33.6078075Z 2     3.394135
2025-09-28T18:48:33.6078311Z 3     3.404821
2025-09-28T18:48:33.6078540Z 4     2.188367
2025-09-28T18:48:33.6078765Z         ...   
2025-09-28T18:48:33.6078999Z 95    7.545585
2025-09-28T18:48:33.6079234Z 96    8.351528
2025-09-28T18:48:33.6079468Z 97    8.126109
2025-09-28T18:48:33.6079713Z 98    7.567812
2025-09-28T18:48:33.6079938Z 99    8.197637
2025-09-28T18:48:33.6080228Z Name: output, Length: 100, dtype: float64
2025-09-28T18:48:33.6080518Z 
2025-09-28T18:48:33.6081836Z     @pytest.mark.skipif(not sklearn_available, reason="scikit-learn package is not available.")
2025-09-28T18:48:33.6083368Z     def test_pipeline_integration(toy_X, toy_y):
2025-09-28T18:48:33.6084130Z         model_config = {
2025-09-28T18:48:33.6085331Z             "intercept": {"loc": 0, "scale": 2},
2025-09-28T18:48:33.6087058Z             "slope": {"loc": 0, "scale": 2},
2025-09-28T18:48:33.6088294Z             "obs_error": 1,
2025-09-28T18:48:33.6089361Z             "default_output_var": "y_hat",
2025-09-28T18:48:33.6090132Z         }
2025-09-28T18:48:33.6090522Z         model = Pipeline(
2025-09-28T18:48:33.6090951Z             [
2025-09-28T18:48:33.6091628Z                 ("input_scaling", StandardScaler()),
2025-09-28T18:48:33.6092290Z                 (
2025-09-28T18:48:33.6092894Z                     "linear_model",
2025-09-28T18:48:33.6093966Z                     TransformedTargetRegressor(LinearModel(model_config), transformer=StandardScaler()),
2025-09-28T18:48:33.6094819Z                 ),
2025-09-28T18:48:33.6095211Z             ]
2025-09-28T18:48:33.6095566Z         )
2025-09-28T18:48:33.6104549Z >       model.fit(toy_X, toy_y)
2025-09-28T18:48:33.6104911Z 
2025-09-28T18:48:33.6105207Z tests\test_linearmodel.py:205: 
2025-09-28T18:48:33.6105723Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-09-28T18:48:33.6106748Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\sklearn\base.py:1365: in wrapper
2025-09-28T18:48:33.6107847Z     return fit_method(estimator, *args, **kwargs)
2025-09-28T18:48:33.6108521Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6109462Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\sklearn\pipeline.py:663: in fit
2025-09-28T18:48:33.6111099Z     self._final_estimator.fit(Xt, y, **last_step_params["fit"])
2025-09-28T18:48:33.6112486Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\sklearn\base.py:1365: in wrapper
2025-09-28T18:48:33.6113579Z     return fit_method(estimator, *args, **kwargs)
2025-09-28T18:48:33.6114254Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6115263Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\sklearn\compose\_target.py:293: in fit
2025-09-28T18:48:33.6116511Z     self.regressor_.fit(X, y_trans, **routed_params.regressor.fit)
2025-09-28T18:48:33.6117345Z pymc_extras\model_builder.py:514: in fit
2025-09-28T18:48:33.6118422Z     self.idata = self.sample_model(**sampler_config)
2025-09-28T18:48:33.6119196Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6119979Z pymc_extras\model_builder.py:307: in sample_model
2025-09-28T18:48:33.6120663Z     idata = pm.sample(**sampler_args)
2025-09-28T18:48:33.6121231Z             ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6122231Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pymc\sampling\mcmc.py:824: in sample
2025-09-28T18:48:33.6123277Z     with joined_blas_limiter():
2025-09-28T18:48:33.6123826Z          ^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6124882Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\pymc\sampling\mcmc.py:744: in joined_blas_limiter
2025-09-28T18:48:33.6126080Z     return threadpool_limits(limits=blas_cores)
2025-09-28T18:48:33.6126752Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6127723Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\threadpoolctl.py:794: in __init__
2025-09-28T18:48:33.6129065Z     super().__init__(ThreadpoolController(), limits=limits, user_api=user_api)
2025-09-28T18:48:33.6129924Z                      ^^^^^^^^^^^^^^^^^^^^^^
2025-09-28T18:48:33.6130866Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\threadpoolctl.py:819: in __init__
2025-09-28T18:48:33.6131910Z     self._warn_if_incompatible_openmp()
2025-09-28T18:48:33.6132477Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-09-28T18:48:33.6132810Z 
2025-09-28T18:48:33.6133136Z self = <threadpoolctl.ThreadpoolController object at 0x000002656CA2A2A0>
2025-09-28T18:48:33.6133687Z 
2025-09-28T18:48:33.6195836Z     def _warn_if_incompatible_openmp(self):
2025-09-28T18:48:33.6197146Z         """Raise a warning if llvm-OpenMP and intel-OpenMP are both loaded"""
2025-09-28T18:48:33.6198534Z         prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers]
2025-09-28T18:48:33.6199511Z         msg = textwrap.dedent(
2025-09-28T18:48:33.6200008Z             """
2025-09-28T18:48:33.6200732Z             Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
2025-09-28T18:48:33.6201670Z             the same time. Both libraries are known to be incompatible and this
2025-09-28T18:48:33.6202608Z             can cause random crashes or deadlocks on Linux when loaded in the
2025-09-28T18:48:33.6203583Z             same Python program.
2025-09-28T18:48:33.6204305Z             Using threadpoolctl may cause crashes or deadlocks. For more
2025-09-28T18:48:33.6205153Z             information and possible workarounds, please see
2025-09-28T18:48:33.6206121Z                 https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
2025-09-28T18:48:33.6206901Z             """
2025-09-28T18:48:33.6207322Z         )
2025-09-28T18:48:33.6208500Z         if "libomp" in prefixes and "libiomp" in prefixes:
2025-09-28T18:48:33.6209771Z >           warnings.warn(msg, RuntimeWarning)
2025-09-28T18:48:33.6210415Z E           RuntimeWarning: 
2025-09-28T18:48:33.6211135Z E           Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
2025-09-28T18:48:33.6212224Z E           the same time. Both libraries are known to be incompatible and this
2025-09-28T18:48:33.6213135Z E           can cause random crashes or deadlocks on Linux when loaded in the
2025-09-28T18:48:33.6213820Z E           same Python program.
2025-09-28T18:48:33.6214518Z E           Using threadpoolctl may cause crashes or deadlocks. For more
2025-09-28T18:48:33.6215635Z E           information and possible workarounds, please see
2025-09-28T18:48:33.6217438Z E               https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
2025-09-28T18:48:33.6218010Z 
2025-09-28T18:48:33.6218756Z C:\Users\runneradmin\micromamba\envs\pymc-extras-test\Lib\site-packages\threadpoolctl.py:1226: RuntimeWarning

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Windows CI run and the traceback entries in pytensor/configparser.py and pytensor/link/c/cmodule.py; inspect how the workflow installs dependencies and reaches blas__ldflags. Reproduce the warning in the Windows CI job, then confirm the run completes without BLAS warnings or rewrite failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.