Skip to content

Commit 41a4b19

Browse files
committed
Fix non-editable install
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
1 parent ca80d4d commit 41a4b19

File tree

2 files changed

+8
-45
lines changed

2 files changed

+8
-45
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
- kind: "customer-scenarios"
126126
extras: "[plt,dowhy]"
127127
pattern: "CustomerScenarios"
128-
version: '3.9'
128+
version: '3.11'
129129
install_graphviz: false
130130
fail-fast: false
131131
env:
@@ -145,9 +145,13 @@ jobs:
145145
- name: Install graphviz
146146
run: sudo apt-get -yq install graphviz
147147
if: ${{ matrix.install_graphviz }}
148-
# Add verbose flag to pip installation if in debug mode
149148
- name: Install econml
150-
run: uv pip install --system .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg-notebook.txt' }}
149+
run: |
150+
uv pip install --system build
151+
python -m build --installer uv .
152+
package=$(ls dist/*.whl)
153+
echo "package=$package"
154+
uv pip install --system ./$package${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg-notebook.txt' }}
151155
# Install notebook requirements (if not already done as part of lkg)
152156
- name: Install notebook requirements
153157
run: uv pip install --system jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
@@ -162,7 +166,7 @@ jobs:
162166
- name: Install pytest
163167
run: uv pip install --system pytest pytest-xdist pytest-cov coverage[toml]
164168
- name: Run notebook tests
165-
run: python -m pytest
169+
run: python -P -m pytest
166170
id: run_tests
167171
env:
168172
PYTEST_ADDOPTS: '-m "notebook"'

econml/tests/dgp.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -176,44 +176,3 @@ def policy_gen(Tpre, X, period):
176176
return self._gen_data_with_policy(n_units, policy_gen, random_seed=random_seed)
177177

178178

179-
# Auxiliary function for adding xticks and vertical lines when plotting results
180-
# for dynamic dml vs ground truth parameters.
181-
def add_vlines(n_periods, n_treatments, hetero_inds):
182-
locs, labels = plt.xticks([], [])
183-
locs += [- .501 + (len(hetero_inds) + 1) / 2]
184-
labels += ["\n\n$\\tau_{{{}}}$".format(0)]
185-
locs += [qx for qx in np.arange(len(hetero_inds) + 1)]
186-
labels += ["$1$"] + ["$x_{{{}}}$".format(qx) for qx in hetero_inds]
187-
for q in np.arange(1, n_treatments):
188-
plt.axvline(x=q * (len(hetero_inds) + 1) - .5,
189-
linestyle='--', color='red', alpha=.2)
190-
locs += [q * (len(hetero_inds) + 1) - .501 + (len(hetero_inds) + 1) / 2]
191-
labels += ["\n\n$\\tau_{{{}}}$".format(q)]
192-
locs += [(q * (len(hetero_inds) + 1) + qx)
193-
for qx in np.arange(len(hetero_inds) + 1)]
194-
labels += ["$1$"] + ["$x_{{{}}}$".format(qx) for qx in hetero_inds]
195-
locs += [- .501 + (len(hetero_inds) + 1) * n_treatments / 2]
196-
labels += ["\n\n\n\n$\\theta_{{{}}}$".format(0)]
197-
for t in np.arange(1, n_periods):
198-
plt.axvline(x=t * (len(hetero_inds) + 1) *
199-
n_treatments - .5, linestyle='-', alpha=.6)
200-
locs += [t * (len(hetero_inds) + 1) * n_treatments - .501 +
201-
(len(hetero_inds) + 1) * n_treatments / 2]
202-
labels += ["\n\n\n\n$\\theta_{{{}}}$".format(t)]
203-
locs += [t * (len(hetero_inds) + 1) *
204-
n_treatments - .501 + (len(hetero_inds) + 1) / 2]
205-
labels += ["\n\n$\\tau_{{{}}}$".format(0)]
206-
locs += [t * (len(hetero_inds) + 1) * n_treatments +
207-
qx for qx in np.arange(len(hetero_inds) + 1)]
208-
labels += ["$1$"] + ["$x_{{{}}}$".format(qx) for qx in hetero_inds]
209-
for q in np.arange(1, n_treatments):
210-
plt.axvline(x=t * (len(hetero_inds) + 1) * n_treatments + q * (len(hetero_inds) + 1) - .5,
211-
linestyle='--', color='red', alpha=.2)
212-
locs += [t * (len(hetero_inds) + 1) * n_treatments + q *
213-
(len(hetero_inds) + 1) - .501 + (len(hetero_inds) + 1) / 2]
214-
labels += ["\n\n$\\tau_{{{}}}$".format(q)]
215-
locs += [t * (len(hetero_inds) + 1) * n_treatments + (q * (len(hetero_inds) + 1) + qx)
216-
for qx in np.arange(len(hetero_inds) + 1)]
217-
labels += ["$1$"] + ["$x_{{{}}}$".format(qx) for qx in hetero_inds]
218-
plt.xticks(locs, labels)
219-
plt.tight_layout()

0 commit comments

Comments
 (0)