py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
7.13k stars 935 forks source link

dowhy 0.11.1 dependences looks not being loaded #1230

Closed Slepetys closed 3 months ago

Slepetys commented 3 months ago

Question: I am running some python notebooks from Alexander Molak's book: "Causal Inference and Discovery in Python", which makes extensive use of DoWhy library. Unfortunately written using the 0.8 version of DoWHy, and when I tried to run it in the most updated 0.11.1, I started to receive errors, such as Not loading econml.dml.DML dependences.

The code from the open source Chapter 7 pynb that is causing the error is:

estimate = model.estimate_effect(
    identified_estimand=estimand,
    method_name='backdoor.econml.dml.DML',
    method_params={
        'init_params': {
            'model_y': GradientBoostingRegressor(),
            'model_t': GradientBoostingRegressor(),
            'model_final': LassoCV(fit_intercept=False),
        },
        'fit_params': {}}
)

And the error is: ImportError: Error loading econml.dml.DML. Double-check the method name and ensure that all econml dependencies are installed.

Version information:

Additional context The git with the Python notebook is in: https://github.com/PacktPublishing/Causal-Inference-and-Discovery-in-Python

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.