-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enhancement for doFuture implementation and stable parallel RNG in sim_gs_n #230
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 @cmansch! Looking forward to this!
R/sim_gs_n.R
Outdated
# test = wlr, | ||
# cut = list(ia1 = ia1, ia2 = ia2, fa = fa), | ||
# weight = fh(rho = 0, gamma = 0) | ||
# ) |
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.
Please add back the apostrophe (#'
) as this removed this example from the documentation. Also note that if you are using RStudio, you can execute this code with Ctrl-Enter without having to uncomment it.
@@ -4,14 +4,14 @@ | |||
# See helper-sim_gs_n.R for helper functions | |||
|
|||
test_that("Test 1: regular logrank test", { | |||
# set.seed(2024) |
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 was unfortunate timing as all the sim_gs_n()
tests were commented out. Once #229 is merged, you can rebase on top of that, and then the tests will run.
# ), | ||
# "If you want to run different tests at each cutting" | ||
# ) | ||
expect_equal(1 + 1, 2) |
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.
In the future, instead of commenting out a test, please add skip("The reason the test needs to be skipped")
. This keeps the git diff
's nicer. In other words, it is easier to see what needed to be change to fix a test if it wasn't completely commented out previously.
Implementation for
sim_gs_n()
to have a parallel adaptor similar tosim_fixed_n()
(xref: #110).A seed is now set prior to the function call instead of passed as an argument.
Function now uses
%douture%
to run iterations ofn_sim
in parallel.Addresses open issue (xref: #205).
Sequential backend still available (and default) to avoid any delays in development.
Please update "Remove seed argument from
sim_gs_n()
in (xref: Merck/gsDesign2#288) as part of the implementation.PR will be updated again following approval of PR (xref: #229) as it will need to combine updates to
sim_gs_n
from that PR.