-
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
Auto-generate benchmarks with genthat, and run them #22
Open
vogr
wants to merge
82
commits into
reactorlabs:master
Choose a base branch
from
vogr:master
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
…per outer-iteration
those that succeed with GNUR)
This prevent problems with benchmark named a<-b.R for instance.
the genthat-CRAN directory (else they would be detected by the configuration scripts).
very cool. thanks a lot @vogr. do you know how long it takes to run the full thing? |
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.
(Note: this PR requires a patched version of genthat, see PRL-PRG/genthat#162)
This PR makes it possible to extract benchmarks from CRAN packages using genthat, to automatically generate the necessary fields in rebench.conf (including the number of inner-iterations per benchmarks).
All of this can be done in a reproducible way using MRAN (pinned to the day 2020-02-28, one day before the release of R 3.6.3 so that all the packages are compatible with R 3.6.2).
The steps necessary to generate and run the benchmarks are:
packages.txt
): seeRBenchmarking/Setup/genthat/README.md
(install_genthat.R
,install_pkgs.R
,extract_testcases.R
). All these steps can be automated using the docker image built fromSetup/genthat/Dockerfile
(details in the README). You should then copy the benchmarks toBenchmarks/genthat-CRAN/generated
check_against_recorded_retv.sh
)pick_one_testcase.sh
)min_nb_iter.R
, seeSetup/genthat/inner_it/README.md
)Setup/run.sh
, like for the other benchmarks. The configuration file will be generated bygenthat_rebenchconf.py
from the name of the benchmarks and the number of iterations determined in the previous step.You do not have to actually run step 1: the generated files are already saved in the repo (as their generation takes a large amount of time, and because it makes sense to "freeze" the benchmarks for reproducibility).
To actually run step 2, the Docker image used for rebench needs some modification (modified from
container/benchmark/Dockerfile
in https://github.com/reactorlabs/rir) :The two last lines were modified: use the modified RBenchmarking branch, and install the R packages necessary to run the benchmarks. Also set R_LIBS accordingly (alternatively, the default folders could be used, but I wanted to prevent collisions with other potential R packages).
To actually run the benchmarks:
The next step would be to actually decide which packages to extract calls from (currenty only 8 packages were chosen, at random), and to select a relevant subset of the generated file (currently, one file has been kept per function, to have a total of 51 files).
Note: if the PR PRL-PRG/genthat#162 gets merged into master, the script install_genthat.R should be updated to install genthat from the
master
branch instead of theonly-calls
branch.