Skip to content

Commit 8d58f37

Browse files
committed
Use lkg requirements for PRs
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
1 parent 0a714bf commit 8d58f37

File tree

4 files changed

+289
-18
lines changed

4 files changed

+289
-18
lines changed

.github/workflows/ci.yml

+43-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run all checks for pull requests
1+
name: Run all checks
22

33
on:
44
pull_request:
@@ -11,10 +11,24 @@ on:
1111
required: false
1212
default: ''
1313
type: string
14+
use_lkg:
15+
description: 'Whether to use the last known good versions of dependencies'
16+
required: true
17+
default: True
18+
type: boolean
19+
# nightly
20+
schedule:
21+
- cron: '0 0 * * *'
22+
23+
# Only run once per PR, canceling any previous runs
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
26+
cancel-in-progress: true
1427

1528
# Precompute the ref if the workflow was triggered by a workflow dispatch rather than copying this logic repeatedly
1629
env:
1730
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || null }}
31+
use_lkg: ${{ (github.event_name == 'workflow_dispatch' && inputs.use_lkg || github.event_name == 'pull_request') || null }}
1832

1933
jobs:
2034
eval:
@@ -85,7 +99,7 @@ jobs:
8599
- uses: actions/setup-python@v4
86100
name: Setup Python
87101
with:
88-
python-version: 3.9
102+
python-version: '3.9'
89103
- run: python -m pip install --upgrade pip && pip install --upgrade setuptools
90104
name: Ensure latest pip and setuptools
91105
- run: 'pip install pycodestyle && pycodestyle econml'
@@ -103,11 +117,11 @@ jobs:
103117
extras: "[tf,plt]"
104118
pattern: "(?!CustomerScenarios)"
105119
install_graphviz: true
106-
version: 3.8 # no supported version of tensorflow for 3.9
120+
version: '3.8' # no supported version of tensorflow for 3.9
107121
- kind: "customer-scenarios"
108122
extras: "[plt,dowhy]"
109123
pattern: "CustomerScenarios"
110-
version: 3.9
124+
version: '3.9'
111125
install_graphviz: false
112126
fail-fast: false
113127
steps:
@@ -125,12 +139,22 @@ jobs:
125139
name: Install graphviz
126140
if: ${{ matrix.install_graphviz }}
127141
# Add verbose flag to pip installation if in debug mode
128-
- run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }}
142+
- run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg-notebook.txt' }}
129143
name: Install econml
130-
- run: pip install pytest pytest-runner coverage jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
131-
name: Install test and notebook requirements
132-
- run: pip list
133-
name: List installed packages
144+
# Install notebook requirements (if not already done as part of lkg)
145+
- run: pip install jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
146+
name: Install notebook requirements
147+
if: ${{ !env.use_lkg }}
148+
- run: pip freeze --exclude-editable > notebooks-${{ matrix.version }}-${{ matrix.kind }}-requirements.txt
149+
name: Save installed packages
150+
- uses: actions/upload-artifact@v3
151+
name: Upload installed packages
152+
with:
153+
name: requirements
154+
path: notebooks-${{ matrix.version }}-${{ matrix.kind }}-requirements.txt
155+
- run: pip install pytest pytest-runner coverage
156+
name: Install pytest
157+
134158
- run: python setup.py pytest
135159
name: Run notebook tests
136160
id: run_tests
@@ -156,16 +180,12 @@ jobs:
156180
strategy:
157181
matrix:
158182
os: [ubuntu-latest, windows-latest, macos-latest]
159-
python-version: [3.6, 3.7, 3.8, 3.9]
183+
python-version: ['3.7', '3.8', '3.9', '3.10']
160184
kind: [serial, other, dml, main, treatment]
161185
exclude:
162186
# Serial tests fail randomly on mac sometimes, so we don't run them there
163187
- os: macos-latest
164188
kind: serial
165-
# Python 3.6 isn't supported on ubuntu-latest
166-
- os: ubuntu-latest
167-
python-version: 3.6
168-
169189
# Assign the correct package and testing options for each kind of test
170190
include:
171191
- kind: serial
@@ -197,8 +217,15 @@ jobs:
197217
- run: python -m pip install --upgrade pip && pip install --upgrade setuptools
198218
name: Ensure latest pip and setuptools
199219
# Add verbose flag to pip installation if in debug mode
200-
- run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }}
220+
- run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg.txt' }}
201221
name: Install econml
222+
- run: pip freeze --exclude-editable > tests-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.kind }}-requirements.txt
223+
name: Save installed packages
224+
- uses: actions/upload-artifact@v3
225+
name: Upload installed packages
226+
with:
227+
name: requirements
228+
path: tests-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.kind }}-requirements.txt
202229
- run: pip install pytest pytest-runner coverage
203230
name: Install pytest
204231
- run: python setup.py pytest
@@ -236,7 +263,7 @@ jobs:
236263
- uses: actions/setup-python@v4
237264
name: Setup Python
238265
with:
239-
python-version: 3.8
266+
python-version: '3.8'
240267
- run: pip install coverage
241268
name: Install coverage
242269
- run: coverage combine coverage/

lkg-notebook.txt

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
Jinja2==3.1.2
2+
Keras-Applications==1.0.8; python_version<='3.8'
3+
Keras-Preprocessing==1.1.2; python_version<='3.8'
4+
Keras==2.3.1; python_version<='3.8'
5+
Markdown==3.4.3; python_version<='3.8'
6+
MarkupSafe==2.1.2
7+
Pillow==9.5.0
8+
PyYAML==6.0
9+
Pygments==2.15.1
10+
QtPy==2.3.1
11+
Send2Trash==1.8.2
12+
Werkzeug==2.3.4; python_version<='3.8'
13+
absl-py==1.4.0; python_version<='3.8'
14+
anyio==3.6.2
15+
argon2-cffi-bindings==21.2.0
16+
argon2-cffi==21.3.0
17+
arrow==1.2.3
18+
asttokens==2.2.1
19+
astunparse==1.6.3; python_version<='3.8'
20+
attrs==23.1.0
21+
backcall==0.2.0
22+
beautifulsoup4==4.12.2
23+
bleach==6.0.0
24+
cachetools==4.2.4; python_version<='3.8'
25+
certifi==2023.5.7; python_version<='3.8'
26+
cffi==1.15.1
27+
charset-normalizer==3.1.0; python_version<='3.8'
28+
cloudpickle==2.2.1
29+
comm==0.1.3
30+
cycler==0.11.0
31+
debugpy==1.6.7
32+
decorator==5.1.1
33+
defusedxml==0.7.1
34+
dowhy==0.8; '3.9'<=python_version
35+
executing==1.2.0
36+
fastjsonschema==2.16.3
37+
fonttools==4.39.4
38+
fqdn==1.5.1
39+
gast==0.3.3; python_version<='3.8'
40+
google-auth-oauthlib==0.4.6; python_version<='3.8'
41+
google-auth==1.35.0; python_version<='3.8'
42+
google-pasta==0.2.0; python_version<='3.8'
43+
graphviz==0.20.1
44+
grpcio==1.54.2; python_version<='3.8'
45+
h5py==2.10.0; python_version<='3.8'
46+
idna==3.4
47+
importlib-metadata==6.6.0
48+
importlib-resources==5.12.0; python_version<='3.8'
49+
ipykernel==6.23.1
50+
ipython-genutils==0.2.0
51+
ipython==8.12.2; python_version<='3.8'
52+
ipython==8.13.2; '3.9'<=python_version
53+
ipywidgets==8.0.6
54+
isoduration==20.11.0
55+
jedi==0.18.2
56+
joblib==1.2.0
57+
jsonpointer==2.3
58+
jsonschema==4.17.3
59+
jupyter-console==6.6.3
60+
jupyter-events==0.6.3
61+
jupyter==1.0.0
62+
jupyter_client==8.2.0
63+
jupyter_core==5.3.0
64+
jupyter_server==2.5.0
65+
jupyter_server_terminals==0.4.4
66+
jupyterlab-pygments==0.2.2
67+
jupyterlab-widgets==3.0.7
68+
kiwisolver==1.4.4
69+
lightgbm==3.3.5
70+
llvmlite==0.40.0
71+
matplotlib-inline==0.1.6
72+
matplotlib==3.5.3
73+
mistune==2.0.5
74+
mpmath==1.3.0; '3.9'<=python_version
75+
nbclassic==1.0.0
76+
nbclient==0.7.4
77+
nbconvert==7.4.0
78+
nbformat==5.8.0
79+
nest-asyncio==1.5.6
80+
networkx==3.1; '3.9'<=python_version
81+
notebook==6.5.4
82+
notebook_shim==0.2.3
83+
numba==0.57.0
84+
numpy==1.23.5; python_version<='3.8'
85+
numpy==1.24.3; '3.9'<=python_version
86+
oauthlib==3.2.2; python_version<='3.8'
87+
opt-einsum==3.3.0; python_version<='3.8'
88+
packaging==23.1
89+
pandas==2.0.1
90+
pandocfilters==1.5.0
91+
parso==0.8.3
92+
patsy==0.5.3
93+
pexpect==4.8.0
94+
pickleshare==0.7.5
95+
pkgutil_resolve_name==1.3.10; python_version<='3.8'
96+
platformdirs==3.5.1
97+
prometheus-client==0.16.0
98+
prompt-toolkit==3.0.38
99+
protobuf==3.20.3; python_version<='3.8'
100+
psutil==5.9.5
101+
ptyprocess==0.7.0
102+
pure-eval==0.2.2
103+
pyasn1-modules==0.3.0; python_version<='3.8'
104+
pyasn1==0.5.0; python_version<='3.8'
105+
pycparser==2.21
106+
pydot==1.4.2; '3.9'<=python_version
107+
pyparsing==3.0.9
108+
pyrsistent==0.19.3
109+
python-dateutil==2.8.2
110+
python-json-logger==2.0.7
111+
pytz==2023.3
112+
pyzmq==25.0.2
113+
qtconsole==5.4.3
114+
requests-oauthlib==1.3.1; python_version<='3.8'
115+
requests==2.30.0; python_version<='3.8'
116+
rfc3339-validator==0.1.4
117+
rfc3986-validator==0.1.1
118+
rsa==4.9; python_version<='3.8'
119+
scikit-learn==1.2.2
120+
scipy==1.10.1; '3.9'<=python_version
121+
scipy==1.4.1; python_version<='3.8'
122+
seaborn==0.12.2
123+
shap==0.41.0
124+
six==1.16.0
125+
slicer==0.0.7
126+
sniffio==1.3.0
127+
soupsieve==2.4.1
128+
sparse==0.14.0
129+
stack-data==0.6.2
130+
statsmodels==0.14.0
131+
sympy==1.12; '3.9'<=python_version
132+
tensorboard-plugin-wit==1.8.1; python_version<='3.8'
133+
tensorboard==2.2.2; python_version<='3.8'
134+
tensorflow-estimator==2.2.0; python_version<='3.8'
135+
tensorflow==2.2.0; python_version<='3.8'
136+
termcolor==2.3.0; python_version<='3.8'
137+
terminado==0.17.1
138+
threadpoolctl==3.1.0
139+
tinycss2==1.2.1
140+
tornado==6.3.2
141+
tqdm==4.65.0
142+
traitlets==5.9.0
143+
typing_extensions==4.5.0
144+
tzdata==2023.3
145+
uri-template==1.2.0
146+
urllib3==2.0.2; python_version<='3.8'
147+
wcwidth==0.2.6
148+
webcolors==1.13
149+
webencodings==0.5.1
150+
websocket-client==1.5.1
151+
widgetsnbextension==4.0.7
152+
wrapt==1.15.0; python_version<='3.8'
153+
xgboost==1.7.5
154+
zipp==3.15.0

lkg.txt

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
Keras-Applications==1.0.8; python_version<='3.8'
2+
Keras-Preprocessing==1.1.2; python_version<='3.8'
3+
Keras==2.3.1; python_version<='3.8'
4+
Markdown==3.4.3; python_version<='3.8'
5+
MarkupSafe==2.1.2; python_version<='3.8'
6+
Pillow==9.5.0
7+
PyYAML==6.0; python_version<='3.8'
8+
Werkzeug==2.2.3; python_version<='3.7'
9+
Werkzeug==2.3.4; python_version=='3.8'
10+
absl-py==1.4.0; python_version<='3.8'
11+
argcomplete==3.0.8; '3.9'<=python_version and platform_system=='Windows'
12+
astunparse==1.6.3; python_version<='3.8'
13+
cachetools==4.2.4; python_version<='3.8'
14+
certifi==2023.5.7; python_version<='3.8'
15+
charset-normalizer==3.1.0; python_version<='3.8'
16+
click==8.1.3; '3.9'<=python_version and platform_system=='Windows'
17+
cloudpickle==2.2.1
18+
colorama==0.4.6; platform_system=='Windows'
19+
cycler==0.11.0
20+
dowhy==0.8
21+
fonttools==4.38.0; python_version<='3.7'
22+
fonttools==4.39.4; '3.8'<=python_version
23+
gast==0.3.3; python_version<='3.8'
24+
google-auth-oauthlib==0.4.6; python_version<='3.8'
25+
google-auth==1.35.0; python_version<='3.8'
26+
google-pasta==0.2.0; python_version<='3.8'
27+
graphviz==0.20.1
28+
grpcio==1.54.0; python_version<='3.8'
29+
h5py==2.10.0; python_version<='3.8'
30+
idna==3.4; python_version<='3.8'
31+
importlib-metadata==6.6.0; python_version<='3.8'
32+
joblib==1.2.0
33+
kiwisolver==1.4.4
34+
lightgbm==3.3.5
35+
llvmlite==0.39.1; python_version<='3.7'
36+
llvmlite==0.40.0; '3.8'<=python_version
37+
matplotlib==3.5.3
38+
mpmath==1.3.0
39+
networkx==2.6.3; python_version<='3.7'
40+
networkx==3.1; '3.8'<=python_version
41+
numba==0.56.4; python_version<='3.7'
42+
numba==0.57.0; '3.8'<=python_version
43+
numpy==1.18.5; python_version<='3.7'
44+
numpy==1.23.5; '3.8'<=python_version
45+
oauthlib==3.2.2; python_version<='3.8'
46+
opt-einsum==3.3.0; python_version<='3.8'
47+
packaging==23.1
48+
pandas==1.3.5; python_version<='3.7'
49+
pandas==2.0.1; '3.8'<=python_version
50+
patsy==0.5.3
51+
pipx==1.2.0; '3.9'<=python_version and platform_system=='Windows'
52+
protobuf==3.20.3
53+
pyasn1-modules==0.3.0; python_version<='3.8'
54+
pyasn1==0.5.0; python_version<='3.8'
55+
pydot==1.4.2
56+
pyparsing==3.0.9
57+
python-dateutil==2.8.2
58+
pytz==2023.3
59+
requests-oauthlib==1.3.1; python_version<='3.8'
60+
requests==2.30.0; python_version<='3.8'
61+
rsa==4.9; python_version<='3.8'
62+
scikit-learn==1.0.2; python_version<='3.7'
63+
scikit-learn==1.2.2; '3.8'<=python_version
64+
scipy==1.10.1; '3.9'<=python_version
65+
scipy==1.4.1; python_version=='3.8'
66+
scipy==1.7.3; python_version<='3.7'
67+
shap==0.41.0
68+
six==1.16.0
69+
slicer==0.0.7
70+
sparse==0.13.0; python_version<='3.7'
71+
sparse==0.14.0; '3.8'<=python_version
72+
statsmodels==0.13.5; python_version<='3.7'
73+
statsmodels==0.14.0; '3.8'<=python_version
74+
sympy==1.10.1; python_version<='3.7'
75+
sympy==1.12; '3.8'<=python_version
76+
tensorboard-plugin-wit==1.8.1; python_version<='3.8'
77+
tensorboard==2.2.2; python_version<='3.8'
78+
tensorflow-estimator==2.2.0; python_version<='3.8'
79+
tensorflow==2.2.0; python_version=='3.8'
80+
tensorflow==2.2.3; python_version<='3.7'
81+
termcolor==2.3.0; python_version<='3.8'
82+
threadpoolctl==3.1.0
83+
tqdm==4.65.0
84+
typing_extensions==4.5.0; python_version<='3.7'
85+
tzdata==2023.3; '3.8'<=python_version
86+
urllib3==2.0.2; python_version<='3.8'
87+
userpath==1.8.0; '3.9'<=python_version and platform_system=='Windows'
88+
wrapt==1.15.0; python_version<='3.8'
89+
zipp==3.15.0; python_version<='3.8'

setup.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ dowhy =
6868
dowhy < 0.9
6969
all =
7070
azure-cli
71-
keras < 2.4
72-
tensorflow > 1.10, < 2.3
71+
; The tf components are not currently compatible with python 3.9 or above because of tensorflow breaking changes
72+
keras < 2.4;python_version < '3.9'
73+
tensorflow > 1.10, < 2.3;python_version < '3.9'
7374
; Version capped due to tensorflow incompatibility
7475
protobuf < 4
7576
; Version capped due to tensorflow incompatibility

0 commit comments

Comments
 (0)