causalml
causalml copied to clipboard
TypeError in Cython code on numba==0.63.1 and causalml==0.15.4
Describe the bug
When importing causalml.dataset on the 0.15.4 release we are experiencing the following failure:
TypeError: C variable sklearn.utils._random.DEFAULT_SEED has wrong signature (expected __pyx_t_7sklearn_5utils_9_typedefs_uint32_t, got __pyx_t_7sklearn_5utils_9_typedefs_uint32_t const )
To Reproduce Steps to reproduce the behavior:
# uv pip install numba==0.63.1
# uv pip install causalml==0.15.4 # order matters here!
import causalml.dataset
Expected behavior Should pass
Environment (please complete the following information):
- OS: Ubuntu, MacOS
- Python Version: 3.13, 3.14
- Versions of Major Dependencies:
pandas==2.3.3,scikit-learn==1.8.0,cython==3.2.2
Additional context
We experience this in the SHAP pipelines: https://github.com/shap/shap/actions/runs/20113311832/job/57716416017#step:11:15.
We could also upgrade to the latest release of causalml if that supports scipy>=1.16 (a requirement of ours), since the bug seems to be fixed on causalml==0.15.5