-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for parabar
and other performance and documentation improvements
#7
Open
mihaiconstantin
wants to merge
50
commits into
SachaEpskamp:master
Choose a base branch
from
mihaiconstantin:issue/3
base: master
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.
Conversation
This file contains 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for
parabar
and can close #5 and SachaEpskamp/bootnet#82 (i.e., when the changes are implemented intobootnet
).There are quite a bit of changes, including breaking changes, but I think they are worth it. Briefly, the main changes are:
parbar
backends.README.md
.README.md
.vignettes/supercomputer.Rmd
discussing howparSim
can be used on the Lisa cluster.In terms of
parSim
arguments, there are a few improvements as well:packages
library
andrequire
calls, which would end up being executed at every single repetition.exclude
exclude
argument to work with unquoted expressions. For instance, one can now writeexclude = sample_size == 100 | beta == 0
or even more sophisticated expressions such asexclude = sample_size %in% c(50, 250) | beta == 0
. Internally this is now handled using baseR
substitution and evaluation (i.e., I have no idea how to do this indplyr
and the previous implementation got deprecated).save
write
andname
under a single and clear to use argument calledsave
. As indicated in the documentation, this argument takes a logical or string value controlling whether and where to save the results to a text file. Ifsave = TRUE
the results are saved to a temporary file (i.e., created usingbase::tempfile
). If save is a string, the results are saved to the specified file. Ifsave = FALSE
the results are not saved. Upon saving the results, a message is printed to the console indicating the location of the saved file.Some additional perks:
parSim
now also have access to theparabar::configure_bar
function which enables them to configure the progress bar however they see fit, or switch between theR
built-in progress bar and the more modern one provided by theprogress
package.roxygen2
for generating the.Rd
files. This PR does not includeroxygen2
.Performance Note
Please note that I dropped the
data.table
version. Instead, I rewrote theparSim
with an eye on performance. The currentparSim
implementation is roughly 66% faster than the previous implementation when executing the task in parallel. This number is based on theREADME.md
example executed in parallel with four cores, 100 replications (i.e., pertaining to the simulation conditions), and progress tracking:The progress bar was configured as follows:
Based on my tests, the current implementation is also marginally faster when executing tasks sequentially, with or without a progress bar.
Finally, please note that I bumped the version in
DESCRIPTION
from0.1.4
to0.2.0
. This is to avoid errors in theCRAN
checks because the current version on github.com/SachaEpskamp/parSim is0.1.4
, which is inconsistent with theCRAN
release that is at0.1.5
.