From e9c8c333847bc682749a3f673c6810621f68d404 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Thu, 24 Oct 2024 14:04:10 +0000 Subject: [PATCH 1/2] Test eval --- docs/evaluation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/evaluation.md b/docs/evaluation.md index de62cee0..48400de8 100644 --- a/docs/evaluation.md +++ b/docs/evaluation.md @@ -1,6 +1,6 @@ # Evaluating the RAG answer quality -Follow these steps to evaluate the quality of the answers generated by the RAG flow. +Follow these steps to evaluate the quality of the answers generated by the RAG. * [Deploy a GPT-4 model](#deploy-a-gpt-4-model) * [Setup the evaluation environment](#setup-the-evaluation-environment) From 10efa353e27e276709d810d38dd5f655e68c7cb4 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Thu, 24 Oct 2024 14:22:59 +0000 Subject: [PATCH 2/2] Push to right branch --- .github/workflows/evaluate.yaml | 17 +++++++++++++++-- docs/evaluation.md | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/evaluate.yaml b/.github/workflows/evaluate.yaml index fafcf6a3..6cf2bfa1 100644 --- a/.github/workflows/evaluate.yaml +++ b/.github/workflows/evaluate.yaml @@ -193,12 +193,25 @@ jobs: body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).` }) + - name: Get PR branch name + id: get_pr_branch + uses: actions/github-script@v7 + with: + script: | + const prNumber = context.issue.number; + const { data: pr } = await github.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }); + return { branch: pr.head.ref }; + - name: Commit and push eval results if: ${{ success() }} run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git checkout ${{ github.head_ref }} + git checkout -b temp-branch git add evals/results/pr${{ github.event.issue.number }} git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}" - git push + git push origin temp-branch:${{ steps.get_pr_branch.outputs.branch }} diff --git a/docs/evaluation.md b/docs/evaluation.md index 48400de8..de62cee0 100644 --- a/docs/evaluation.md +++ b/docs/evaluation.md @@ -1,6 +1,6 @@ # Evaluating the RAG answer quality -Follow these steps to evaluate the quality of the answers generated by the RAG. +Follow these steps to evaluate the quality of the answers generated by the RAG flow. * [Deploy a GPT-4 model](#deploy-a-gpt-4-model) * [Setup the evaluation environment](#setup-the-evaluation-environment)