-
Notifications
You must be signed in to change notification settings - Fork 4
fix false-> true #149
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
Open
audreyyeoCH
wants to merge
5
commits into
main
Choose a base branch
from
146_h_get_decision_one_predprob_fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix false-> true #149
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hi @danielinteractive , in
h_getBetamixPost, I added a warning a few issues ago, for input weights that don't add up to 1. The test for anything that relies on this helper therefore needs to handle the repeated warnings and I found this solution.This solution may be measured to the risk of the wrong user weight input. If we believe so, we can incorporate the multiple warnings in the test, to ensure it gives the correct number of the same warnings.
This solution may be seen as an overkill - if we remove the warning of "Weights have been corrected", and someone decides to add it later on, it will cause a chain of warnings again in all the call functions that have
h_getBetamixPostas their helper function.Thought I'd check in with your views on the what the risk vs benefit is before I add it to the other tests. Thanks!
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 @audreyyeoCH , good point. I think for the tests it might be ok, but I am more concerned then about the user experience: Is this helper function called inside simulation loops somewhere e.g. and might trigger as many warnings as there are simulation iterations?
If yes, I think we need to do something about it.
However, for the topic of this PR this seems tangential at best, so it would be better to handle this in a separate issue / PR if possible. That is, can we not leave this particular test as it was before in this PR?
Uh oh!
There was an error while loading. Please reload this page.
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 looking into it @danielinteractive.
edit: the number of warnings is not the number of simulations. It is the number of arms + number of posteriors calculated * number of arms. In addition, the number of warnings is capped at 50, with this warning
The number of posteriors in this scenario is:
for active arm : 17 patients left to recruit, therefore 18 possible results (0....17 responders)
for control arm: 10 patients left to recruit, therefore 11 possible results (0...11 responders).
This is an array of 18 x 11 elements, making it a total of 198 possible combination of results from each arm. We have two warnings per posterior because there are 2 arms, making it a sum of 396 warnings.
plus the posterior from calculating each arm. This is 2.
In total it is 396 + 2 warnings = 398 warnings. The number of same warnings is 398.
I do not believe it affects the user experience, because of the one line of warning above. Thus I feel we can go either way to carry on with ensuring all tests capture warnings or completely remove the warning from
h_getBetamixPost, such that the user carries their own risk of mis-specifying their weights since... $paramswill show what weights were used. What do you think ?I agree it seems tangential, but it is causing the checks not to pass. Is there another way around this that I am not seeing ?
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.
OK I ran checks on the
mainbranch and they are failing because of the warnings (and few other things):https://github.com/Genentech/phase1b/actions/runs/20737971973/job/59539040271
I would recommend to first make a separate issue/PR to fix this, get the
mainbranch into a clean state, and then continue with this issue/PR.As an idea for the fix, I think so many warnings are just too many. Either we move the warning up to the user level function such that it is only given once per user call. Or we just don't warn.