From 51b81ffecccbe97e8e61cfc1833597ddd1233f18 Mon Sep 17 00:00:00 2001 From: Visruth Srimath Kandali Date: Wed, 15 Apr 2026 18:55:47 -0700 Subject: [PATCH 1/3] Update script.R --- touchstone/script.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/touchstone/script.R b/touchstone/script.R index 644259bb..837c5d6e 100644 --- a/touchstone/script.R +++ b/touchstone/script.R @@ -26,7 +26,7 @@ touchstone::benchmark_run( ) ) }, - n = 10 + n = 30 ) touchstone::benchmark_run( @@ -50,7 +50,7 @@ touchstone::benchmark_run( ) ) }, - n = 10 + n = 30 ) # create artifacts used downstream in the GitHub Action From 27fdb06f88d32bcef137ae714b9576ea8525d793 Mon Sep 17 00:00:00 2001 From: Visruth Srimath Kandali Date: Wed, 15 Apr 2026 20:27:07 -0700 Subject: [PATCH 2/3] Update script.R --- touchstone/script.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/touchstone/script.R b/touchstone/script.R index 837c5d6e..8245a535 100644 --- a/touchstone/script.R +++ b/touchstone/script.R @@ -4,14 +4,12 @@ # installs branches to benchmark touchstone::branch_install() +# make log lik available to tests touchstone::pin_assets("touchstone/wine.rds") -# These synthetic workloads are large enough to expose real slowdowns in the -# core `loo()` paths, but still short enough to keep PR feedback reasonably fast. touchstone::benchmark_run( expr_before_benchmark = { suppressPackageStartupMessages(library(loo)) - # benchmark_run() evaluates in a callr subprocess, so load pinned assets here. wine_log_lik_matrix <- readRDS(touchstone::path_pinned_asset( "touchstone/wine.rds" )) From 434c86b5ec6aacd6ed39cfb4aa140cae6041905b Mon Sep 17 00:00:00 2001 From: VisruthSK Date: Thu, 16 Apr 2026 09:07:29 -0700 Subject: [PATCH 3/3] Trying to use sticky comment --- .github/workflows/touchstone-comment.yaml | 37 ++++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/touchstone-comment.yaml b/.github/workflows/touchstone-comment.yaml index ca14d073..ea5e392b 100644 --- a/.github/workflows/touchstone-comment.yaml +++ b/.github/workflows/touchstone-comment.yaml @@ -1,25 +1,46 @@ name: Continuous Benchmarks (Comment) concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.run_id }} cancel-in-progress: true on: workflow_run: workflows: ["Continuous Benchmarks (Receive)"] - types: - - completed + types: [completed] jobs: - upload: + comment: runs-on: ubuntu-latest permissions: actions: read pull-requests: write - statuses: write - if: > - ${{ github.event.workflow_run.event == 'pull_request' }} + if: ${{ github.event.workflow_run.event == 'pull_request' }} steps: - - uses: lorenzwalthert/touchstone/actions/comment@main + - name: Download Touchstone artifact + id: download + uses: actions/download-artifact@v8 + with: + name: pr + github-token: ${{ github.token }} + repository: ${{ github.repository }} + run-id: ${{ github.event.workflow_run.id }} + + # defensive since issues could cause commenting in random places + - name: Read PR number + id: pr + shell: bash + run: | + number="$(tr -cd '0-9' < ./NR)" + test -n "$number" + echo "number=$number" >> "$GITHUB_OUTPUT" + + - name: Create or update sticky PR comment + id: comment + uses: marocchino/sticky-pull-request-comment@v3 with: GITHUB_TOKEN: ${{ github.token }} + number_force: ${{ steps.pr.outputs.number }} + header: touchstone + path: ./info.txt + skip_unchanged: true