-
Notifications
You must be signed in to change notification settings - Fork 793
fix dowhy_ not existance issue
#929
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
Conversation
kbattocchi
left a comment
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_objectwill 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 <[email protected]> Signed-off-by: chenglu <[email protected]>
Signed-off-by: chenglu <[email protected]>
Signed-off-by: chenglu <[email protected]>
f7027ed to
ac743bf
Compare
for more information, see https://pre-commit.ci
kbattocchi
left a comment
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!
fix dowhy_ not existance issue Signed-off-by: chenglu <[email protected]> Signed-off-by: Carl Gold <[email protected]>
fix dowhy_ not existance issue Signed-off-by: chenglu <[email protected]> Signed-off-by: Carl Gold <[email protected]>
fix dowhy_ not existance issue Signed-off-by: chenglu <[email protected]> Signed-off-by: Carl Gold <[email protected]>
objecthas no__getattr__attribute so callingsuper().__getattr__is wrong, should change it togetattr(self, name).dowhy_is not exist untilfitis called, just have a more intuitive error message when someone calls methods withoutfitting.