-
Notifications
You must be signed in to change notification settings - Fork 3
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
CI tests #79
Conversation
Thank you for this PR @brash6 ! As for some of the warnings that persist in both CIs that still have issues due to the test, I see as well that some operations
I don't know if it is a big deal or if we should address it so as to close the issue #48 as well. Do we know so far why we obtain sometimes NaN as outputs in the test Thank you again for your time and for this work! |
The last failing test is this one due to division by zero as @houssamzenati mentioned earlier :
As discussed last Friday, is it ok for you to solve it in this PR ? @judithabk6 |
Great! Thanks a lot. Judith if needed I will have time Thursday to work on this issue. |
yes, on it! so working on clipping for this. |
I have just pushed clipping. It seems to fix tests. I have run some experiments to check the impact. Here are some plots of the estimation without clipping (in absciss), and the version with 1e-6 clipping in ordinate for all variations, for the indirect effect I think it is ok, wdyt @bthirion? |
I think it is OK. Thx ! |
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.
LGTM overall
src/med_bench/mediation.py
Outdated
@@ -721,7 +721,7 @@ def r_mediation_DML(y, t, m, x, trim=0.05, order=1): | |||
return list(raw_res_R[0, :5]) + [ntrimmed] | |||
|
|||
|
|||
def mediation_DML(y, t, m, x, forest=False, crossfit=0, trim=0.05, | |||
def mediation_DML(y, t, m, x, forest=False, crossfit=0, trim=0.05, clip=1e-6, |
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.
def mediation_DML(y, t, m, x, forest=False, crossfit=0, trim=0.05, clip=1e-6, | |
def mediation_DML( | |
y, | |
t, | |
m, | |
x, | |
forest=False, | |
crossfit=0, | |
trim=0.05, | |
clip=1e-6, |
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.
Also we could consider rename mediation_DML
to mediation_dml
You need to catch the error for the CI-without-R |
All checks have passed, can we merge this PR ? |
Hi, |
TODO :
|
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.
LGTM, thx !
For code coverage, I need to add the repository to my Codecov account, and set the Codecov token in the GitHub repository secrets via the repository settings. But the problem is that I don't have access to the repository in Codecov, or to the repository settings. @judithabk6 Can you please create a Codecov account and set the Codecov token in the GitHub repository secrets? This way I can configure the CI using the Codecov token. |
@zbakhm done (I think). Let me know if that doesn't work. Thanks :) |
Do you know why the CI is failing ? |
The CI is failing because I am testing the code coverage feature, and it is giving errors. @judithabk6 I think we have to make a call together to configure the code coverage feature, because I don't have access to the repo parameters on Github and to the repo page on Codecov. |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
LGTM ! |
Apparently the code coverage badge is working with codecov |
In this PR :