-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot call causalml.inference.tree or causalml.dataset #615
Comments
same problem |
I also have this problem |
What numpy version are you running? A quick solve could be upgrading your numpy version. |
Hi everyone, My code is working from google colab. Please try this code- ! git clone https://github.com/uber/causalml.git |
same problem |
Initially run the following code:!pip install Causalml !git clone https://github.com/uber/causalml.git ! git clone https://github.com/uber/causalml.git !pip install numpy==1.23.4 !pip install -U scikit-learn==1.0.2 !pip uninstall scikit-learn when show- Proceed (Y/n)? Put Y and then enter; Then run-import pandas as pd from sklearn.linear_model import LinearRegression from causalml.inference.meta import BaseXRegressor, BaseRRegressor, BaseSRegressor, BaseTRegressor %matplotlib inline warnings.filterwarnings('ignore') plt.style.use('fivethirtyeight') When it is not running, go to "Runtime" and click on "Restart and run all"It will definitely work in google colab, but do not forget # when show- Proceed (Y/n)? Put Y and then enter |
hi @jakirhasantalukder numpy version: 1.23.5 Input In [1] in <cell line: 1> File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:14 in File ~\Anaconda3\lib\site-packages\causalml\inference\meta_init_.py:1 in File ~\Anaconda3\lib\site-packages\causalml\inference\meta\slearner.py:9 in File ~\Anaconda3\lib\site-packages\causalml\inference\meta\base.py:6 in File ~\Anaconda3\lib\site-packages\causalml\inference\meta\explainer.py:2 in File ~\Anaconda3\lib\site-packages\shap_init_.py:5 in File ~\Anaconda3\lib\site-packages\shap_explanation.py:13 in File ~\Anaconda3\lib\site-packages\shap\utils_init_.py:1 in File ~\Anaconda3\lib\site-packages\shap\utils_clustering.py:7 in File ~\Anaconda3\lib\site-packages\numba_init_.py:200 in File ~\Anaconda3\lib\site-packages\numba_init_.py:140 in _ensure_critical_deps ImportError: Numba needs NumPy 1.21 or less If I install numpy==1.20.1, I receive the following errors: Input In [1] in <cell line: 1> File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:15 in File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal_tree.py:16 in File causalml\inference\tree\causal_builder.pyx:1 in init causalml.inference.tree.causal._builder ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject Could you please help me with it? |
Hi, I am a databricks user and attempted to install causalml library using I also attempted to install a newer version of numpy: |
i cannot run the S-learner in my code. I wrote the code below for my dataset, which is attached to this comment. import pandas as pd Load your datasetfile_path = r'/content/prices (2).csv' Assign columns to X and yy = your_data['HolidayFlag'] Ready-to-use S-Learner using LinearRegressionlearner_s = LRSRegressor() After calling estimate_ate, add pretrain=True flag to skip trainingThis flag is applicable for other meta learnerate_s = learner_s.estimate_ate(X=X, treatment=treatment, y=y, pretrain=True) the below error recived; IndexError Traceback (most recent call last) 1 frames IndexError: boolean index did not match indexed array along dimension 0; dimension is 10000 but corresponding boolean dimension is 9885 could anybody help me with that? |
I'm using the code in https://github.com/uber/causalml/blob/master/docs/examples/meta_learners_with_synthetic_data.ipynb. I recieved the below error for the above code Could you please help me with that? |
Describe the bug
A clear and concise description of what the bug is.
Hey I followed exactly steps listed here https://github.com/uber/causalml but I get bugs when I run this line
from causalml.dataset import synthetic_data
but I got an error sayingValueError: sklearn.tree._tree.TreeBuilder size changed, may indicate binary incompatibility. Expected 80 from C header, got 72 from PyObject
To Reproduce
Steps to reproduce the behavior:
$ git clone https://github.com/uber/causalml.git
$ cd causalml
$ pip install -r requirements.txt
$ pip install causalml
from causalml.dataset import synthetic_data
from causalml.inference.tree import UpliftTreeClassifier, UpliftRandomForestClassifier
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Pls help fix it
The text was updated successfully, but these errors were encountered: