You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error while trying to benchmark using the touchstone::benchmark_run function. The error states:
Expression to benchmark cannot have length greater than one.
> touchstone::use_touchstone()
✔ Populated file script.R in touchstone/.
✔ Populated file header.R in touchstone/.
✔ Populated file footer.R in touchstone/.
✔ Populated file config.json in touchstone/.
✔ Populated file .gitignore in touchstone/.
✔ Populated file touchstone-receive.yaml in .github/workflows/.
✔ Populated file touchstone-comment.yaml in .github/workflows/.
✔ Added touchstone to .Rbuildignore.
• Replace the mtcars sample code in `touchstone/script.R` with code from your package
you want to benchmark.
ℹ You can modify the PR comment, see `?touchstone::pr_comment`.
• Commit and push to GitHub to the default branch to activate the workflow, then make
a pull request to trigger your first benchmark run.
> touchstone::benchmark_run(
+ random_test = data.table::setDT(replicate(1000, 1, simplify = FALSE)),
+ n = 1,
+ branch = "master" # Specify your correct branch here
+ )
ℹ touchstone not activated. Most likely, you want to run `touchstone::activate()` and the below error should go away.
Error in `branch_get_or_fail()`:
! If you don't specify the argument `branch(s)`, you must set the environment
variable `GITHUB_BASE_REF` to tell touchstone which branches you want to benchmark
against each other.
ℹ See `?touchstone::run_script`.
Run `rlang::last_trace()` to see where the error occurred.
> touchstone::activate()
✔ Environment ready to interactively execute your touchstone script.
ℹ Use `touchstone::deactivate()` to restore original environment.
> touchstone::benchmark_run(
+ expr_before_benchmark = {
+ library(data.table)
+ set.seed(42)
+ },
+ test_with_seed = data.table::setDT(replicate(1000, 1, simplify = FALSE)),
+ n = 2
+ )
ℹ `activate()` has overriden n = 2 with 1 since `rlang::is_interactive ()` is `TRUE`.
ℹ Running 2 iterations of benchmark: test_with_seed.
✔ Temporarily checked out branch "master".
✔ Ran 1 iteration of branch "master".
✔ Switched back to branch "master".
Error in `purrr::pmap()`:
ℹ In index: 2.
Caused by error in `local_git_checkout()`:
! Branch "main" does not exist, create it and add commits before you can
switch on it.
Run `rlang::last_trace()` to see where the error occurred.
✔ Switched back to branch "master".
I followed the steps to set up the workflow, but the error persists.
Expected Behavior:
The benchmark should execute without error, producing results for the specified workflow.
I'm encountering an error while trying to benchmark using the touchstone::benchmark_run function. The error states:
I followed the steps to set up the workflow, but the error persists.
Expected Behavior:
The benchmark should execute without error, producing results for the specified workflow.
Set the working directory:
Activate:
The text was updated successfully, but these errors were encountered: