Git Product home page Git Product logo

Comments (6)

kakeith avatar kakeith commented on June 11, 2024 1

FYI I got the same error as the previous user, but solved it in a different way.

I tried pip install econml I was getting the error:

ERROR: Failed building wheel for shap

This was solved by conda install -c conda-forge shap.

Then I was able to call model.estimate_effect() with "backdoor.econml" (and as an aside I could also import econml within the notebook as well).

from dowhy.

amit-sharma avatar amit-sharma commented on June 11, 2024

Hey @tszumowski thanks for trying this out. This error is likely due to an older version of sklearn/scikit-learn. Can you try updating to the latest version and check again?

from dowhy.

tszumowski avatar tszumowski commented on June 11, 2024

@amit-sharma. I was at version 0.22. When I ran pip install --upgrade scikit-learn, it stayed at 0.22. See attached pip-freeze for my full environment.
pip-freeze.txt

I believe the main error may be related to:

ImportError: econml.dml.DMLCateEstimator is not an existing causal estimator.

Not sure if it's related, but If I grep the checkout for DMLCateEstimator, I don't get any source results:

$ rg DMLCateEstimator
docs/source/example_notebooks/dowhy-conditional-treatment-effects.ipynb
259:     "evalue": "econml.dml.DMLCateEstimator is not an existing causal estimator.",
281:      "\u001b[0;31mImportError\u001b[0m: econml.dml.DMLCateEstimator is not an existing causal estimator."

from dowhy.

amit-sharma avatar amit-sharma commented on June 11, 2024

Ah, not sure why you are receiving this error. Can you try this Binder notebook and check if it works for you? https://mybinder.org/v2/gh/microsoft/dowhy/48a7a79a2836454f3f1b95ac0bd2eee4e504cb4f

Let me also try to fix the error message so that they are more informative. Currently the "is not an existing estimator" is a catch-all message that shows up on any exception. The root issue seems to be

~/.pyenv/versions/3.6.7/envs/aaa3/lib/python3.6/site-packages/econml-0.5-py3.6.egg/econml/utilities.py in <module>
     34 from collections.abc import Iterable
---> 35 from sklearn.model_selection._split import _CVIterableWrapper, CV_WARNING
     36 from sklearn.utils.multiclass import type_of_target

ImportError: cannot import name 'CV_WARNING'

which I thought may be due to sklearn. Not sure, let me know if the Binder link works and then we can debug

from dowhy.

tszumowski avatar tszumowski commented on June 11, 2024

@amit-sharma
I pulled down the latest from master this morning, started with a fresh virtual environment, and installed with

python setup.py install
pip install -r requirements.txt
pip install jupyter

Then I tried the notebook again. It worked.

Very possible I was in the wrong environment or something. Thanks for the help! I'll close this.

from dowhy.

Akhp888 avatar Akhp888 commented on June 11, 2024

FYI I got the same error as the previous user, but solved it in a different way.

I tried pip install econml I was getting the error:

ERROR: Failed building wheel for shap

This was solved by conda install -c conda-forge shap.

Then I was able to call model.estimate_effect() with "backdoor.econml" (and as an aside I could also import econml within the notebook as well).

Thanks , This worked for me

from dowhy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.