Update supported dependency versions#1017
Merged
kbattocchi merged 7 commits intomainfrom Apr 10, 2026
Merged
Conversation
e559128 to
1455556
Compare
df076de to
5399956
Compare
5399956 to
2f52446
Compare
6576f38 to
57c260a
Compare
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
55d5767 to
5f0f700
Compare
There was a problem hiding this comment.
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.
* 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>
5f0f700 to
a55fe80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.