Skip to content

Update supported dependency versions#1017

Merged
kbattocchi merged 7 commits intomainfrom
kebatt/updateDoWhy
Apr 10, 2026
Merged

Update supported dependency versions#1017
kbattocchi merged 7 commits intomainfrom
kebatt/updateDoWhy

Conversation

@kbattocchi
Copy link
Copy Markdown
Member

No description provided.

@kbattocchi kbattocchi force-pushed the kebatt/updateDoWhy branch 2 times, most recently from df076de to 5399956 Compare January 14, 2026 20:11
@kbattocchi kbattocchi force-pushed the kebatt/updateDoWhy branch 3 times, most recently from 6576f38 to 57c260a Compare April 2, 2026 20:46
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
@kbattocchi kbattocchi force-pushed the kebatt/updateDoWhy branch 2 times, most recently from 55d5767 to 5f0f700 Compare April 6, 2026 21:23
@kbattocchi kbattocchi requested review from Copilot and fverac April 7, 2026 02:42
@kbattocchi kbattocchi marked this pull request as ready for review April 7, 2026 02:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates EconML’s supported dependency/version surface (notably newer NumPy/scikit-learn/DoWhy) and adjusts code, tests, documentation tooling, and “last known good” (LKG) pins to stay compatible.

Changes:

  • Relax/extend declared dependency constraints and refresh LKG requirement pin files.
  • Update several sklearn-adjacent wrappers/utilities and tests for compatibility with newer scikit-learn behavior.
  • Improve documentation/doctest robustness by using scipy-doctest’s tolerant checker during Sphinx doctests.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pyproject.toml Updates dependency constraints (e.g., scikit-learn upper bound, DoWhy range) and adds a numba constraint.
notebooks/Solutions/Causal Interpretation for Employee Attrition Dataset.ipynb Simplifies categorical column detection using select_dtypes.
lkg.txt Refreshes pinned dependency set for CI/“known good” installs.
lkg-notebook.txt Refreshes pinned notebook environment dependency set.
econml/utilities.py Makes _RegressionWrapper sklearn-estimator-compatible (mixins, fittedness hook, param naming).
econml/tests/test_statsmodels.py Fixes array construction/summation for multi-dim treatment/outcome test.
econml/tests/test_model_selection.py Tweaks synthetic DGP for polynomial model-selection test.
econml/tests/test_drlearner.py Updates LogisticRegression usage to align with newer sklearn parameter behavior.
econml/tests/test_dml.py Adjusts tolerance and clarifies comment for ordering/numerical effects.
econml/tests/test_causal_analysis.py Normalizes dtype for category/index comparisons.
econml/solutions/causal_analysis/_causal_analysis.py Normalizes treatment dtype to object for robust comparisons/indexing.
econml/sklearn_extensions/model_selection.py Adds version-conditional copying of multi_class for sklearn < 1.8.
econml/sklearn_extensions/linear_model.py Adds sklearn-version-conditional preprocessing/weight-rescaling behavior and fittedness hook.
econml/score/ensemble_cate.py Switches weight validation to shared input-check helper.
econml/orf/_ortho_forest.py Updates LogisticRegression default/parameter docs and instantiation.
econml/metalearners/_metalearners.py Switches input validation in multiple const_marginal_effect methods to shared helper.
econml/iv/dr/_dr.py Updates docstring example numeric outputs.
econml/dowhy.py Updates untested-version warning threshold to match new supported DoWhy range.
econml/data/dynamic_panel_dgp.py Ensures float DataFrame initialization and adjusts astype usage.
doc/conf.py Monkey-patches doctest output checker to scipy-doctest’s tolerant checker when installed.
.github/workflows/publish-documentation.yml Installs scipy-doctest during doc builds to support tolerant doctest checking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread econml/metalearners/_metalearners.py
Comment thread econml/metalearners/_metalearners.py
Comment thread econml/metalearners/_metalearners.py Outdated
Comment thread econml/metalearners/_metalearners.py
Comment thread econml/score/ensemble_cate.py
Comment thread lkg.txt Outdated
kbattocchi and others added 6 commits April 9, 2026 16:28
* Changes to rescaling when preprocessing data for linear models
* Addition of __sklearn_tags__ metadata
* Make _StatsModelsWrapper and _RegressionWrapper proper sklearn 1.8 estimators (necessary for use in Pipeline)
* Deprecation of multi_class attribute of LogisticRegression
* Fix use of force_finite in check_array to be compatible with sklearn 1.7 and 1.8
* Changes to how floating point values are treated in doctests
* Adjust tests for numerical differences due to changes in Lasso's coordinate descent logic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
pandas 3.0 changed the default string dtype from object to StringDtype,
which requires conversion to numpy arrays before comparisons.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
@kbattocchi kbattocchi force-pushed the kebatt/updateDoWhy branch from 5f0f700 to a55fe80 Compare April 9, 2026 20:29
Copy link
Copy Markdown
Collaborator

@fverac fverac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kbattocchi kbattocchi merged commit 06ae02a into main Apr 10, 2026
114 checks passed
@kbattocchi kbattocchi deleted the kebatt/updateDoWhy branch April 10, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants