py-why / py-why/EconML

More transparent error messages when calling effect functions on un-fitted estimators

Open
#686 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

up for grabs
Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Description

Currently we throw somewhat obscure error messages when users try to call something like est.effect() on an estimator that hasn't been fit yet.

May be better to have a clearer error message.

Repro:

from econml.dml import LinearDML
LinearDML().effect()
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reported LinearDML().effect() reproduction and trace the effect entry point for an unfitted estimator. Add a regression test covering this call and make the resulting error message clearly explain that fitting is required; done means the test passes with the clearer message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.