-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix dowhy_
not existance issue
#929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I have two requests:
- This repo requires all commits to be signed off (which yours isn't), which is causing the DCO check to fail - please amend your commit to sign off on it (there are detailed instructions that you can see if you look at the details of the failing DCO check).
- Please add a test case that fails with the current version of the code but passes with your changes.
ada34cc
to
7fe3696
Compare
if without this patch, LinearDRLearner().dowhy.refute_estimate(method_name="random_common_cause", num_simulations=3)
# or
LinearDRLearner().dowhy._estimator_object will raise
So this is incorrect without a doult, instead we should use getattr here, and to prevent infinite recursion, should add a check before calling All the cases will only happen when use in a wrong way, "accessing attributes without calling |
updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.2 → v0.7.3](astral-sh/ruff-pre-commit@v0.6.2...v0.7.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Keith Battocchi <kebatt@microsoft.com> Signed-off-by: chenglu <chenglu.she@gmail.com>
Signed-off-by: chenglu <chenglu.she@gmail.com>
Signed-off-by: chenglu <chenglu.she@gmail.com>
f7027ed
to
ac743bf
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks!
object
has no__getattr__
attribute so callingsuper().__getattr__
is wrong, should change it togetattr(self, name)
.dowhy_
is not exist untilfit
is called, just have a more intuitive error message when someone calls methods withoutfitting
.