Skip to content
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

dowhy is no longer a dependency of the main econml package #789

Open
Yif18 opened this issue Jul 12, 2023 · 4 comments
Open

dowhy is no longer a dependency of the main econml package #789

Yif18 opened this issue Jul 12, 2023 · 4 comments

Comments

@Yif18
Copy link

Yif18 commented Jul 12, 2023

import dowhy
import econml.dowhy

est = LinearDML(model_y=GradientBoostingRegressor(), model_t=GradientBoostingRegressor(),
featurizer=PolynomialFeatures(degree=2, include_bias=False))
est_dw = est.dowhy.fit(Y, T, X=X, W=W, outcome_names=["log_demand"], treatment_names=["log_price"], feature_names=["income"], confounder_names=confounder_names, inference="statsmodels")

ImportError: dowhy is no longer a dependency of the main econml package; install econml[dowhy] or econml[all] to require it, or install dowhy separately to use dowhy from econml

@kbattocchi
Copy link
Collaborator

This is by design; as the error message indicates, if you'd like to use the integrated dowhy functionality you should install the dowhy extra (pip install econml[dowhy]), not only the base econml package.

Is there something that we could change about the error message or documentation to make this more clear?

@Yif18
Copy link
Author

Yif18 commented Jul 28, 2023

This is by design; as the error message indicates, if you'd like to use the integrated dowhy functionality you should install the dowhy extra (pip install econml[dowhy]), not only the base econml package.

Is there something that we could change about the error message or documentation to make this more clear?

i have installed econml[dowhy] and dowhy,but the error still exists,I found that this error is related to the Python version, and it occurs when I use the latest version of Python(3.10.9)

@titubs
Copy link

titubs commented Aug 7, 2023

@kbattocchi I am getting the same error despite trying the pip installs you mentioned. Can you clarify?

@kbattocchi
Copy link
Collaborator

@titubs Could you include both the full stack trace as well as the output of pip list?

I suspect the issue is actually that either import dowhy or from dowhy import CausalModel is throwing an exception, which we interpret as dowhy not being installed, but which could be caused by some other issue internal to the dowhy package. Could you try running just those two lines in an interpreter and see if you get an error message when you do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants