Skip to content

Commit 475bbbf

Browse files
committed
Enable compatibility with dowhy 0.11
Signed-off-by: Keith Battocchi <[email protected]>
1 parent 7aa509e commit 475bbbf

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

econml/dowhy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class DoWhyWrapper:
3737

3838
def __init__(self, cate_estimator):
3939
from packaging.version import parse
40-
if parse(dowhy.__version__) >= parse('0.11'):
41-
warnings.warn("econml has not been tested with dowhy versions >= 0.11")
40+
if parse(dowhy.__version__) >= parse('0.12'):
41+
warnings.warn("econml has not been tested with dowhy versions >= 0.12")
4242
self._cate_estimator = cate_estimator
4343

4444
def _get_params(self):

pyproject.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ plt = [
5858
"matplotlib"
5959
]
6060
dowhy = [
61-
"dowhy < 0.11"
61+
# when updating this, also update the version check in dowhy.py
62+
"dowhy < 0.12; python_version > '3.8'",
63+
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
64+
"dowhy < 0.11; python_version <= '3.8'"
6265
]
6366
ray = [
6467
"ray > 2.2.0"
@@ -75,8 +78,10 @@ all = [
7578
# Version capped due to tensorflow incompatibility
7679
"numpy < 1.24",
7780
"graphviz",
78-
"matplotlib",
79-
"dowhy < 0.11",
81+
"matplotlib",
82+
"dowhy < 0.12; python_version > '3.8'",
83+
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
84+
"dowhy < 0.11; python_version <= '3.8'",
8085
"ray > 2.2.0"
8186
]
8287

0 commit comments

Comments
 (0)