support numpy>=2.0 in econml
Open
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
Getting errors when using econml with numpy>=2.0:
/usr/share/miniconda/envs/test/lib/python3.9/site-packages/responsibleai/managers/causal_manager.py:10: in <module>
from econml.solutions.causal_analysis import CausalAnalysis
/usr/share/miniconda/envs/test/lib/python3.9/site-packages/econml/solutions/causal_analysis/__init__.py:4: in <module>
from ._causal_analysis import CausalAnalysis
/usr/share/miniconda/envs/test/lib/python3.9/site-packages/econml/solutions/causal_analysis/_causal_analysis.py:13: in <module>
from numpy.lib.function_base import iterable
E ModuleNotFoundError: No module named 'numpy.lib.function_base'
numpy.lib.function_base was deprecated with numpy>=2.0 hence econml needs to fix the import to support it
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in econml/solutions/causal_analysis/_causal_analysis.py, where the import from numpy.lib.function_base is reported to fail with NumPy 2.0 or later. Check the NumPy compatibility issue and the surrounding import usage first. Done means EconML can import successfully with numpy>=2.0 without the reported ModuleNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100