File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ jobs:
136136
137137 - name : Evaluate local RAG flow
138138 run : |
139- python evals/evaluate.py
139+ PR_NUMBER=${{ github.event.pull_request.number }}
140+ python evals/evaluate.py --targeturl=http://127.0.0.1:8000/chat --numquestions=2 --resultsdir=results/pr$PR_NUMBER
140141
141142 - name : Upload server logs as build artifact
142143 uses : actions/upload-artifact@v4
@@ -154,7 +155,7 @@ jobs:
154155 uses : actions/upload-artifact@v4
155156 with :
156157 name : eval_result
157- path : ./src/api/evaluate/eval_results.jsonl
158+ path : ./evals/results/pr${{ github.event.pull_request.number }}
158159
159160 - name : GitHub Summary Step
160161 if : ${{ success() }}
Original file line number Diff line number Diff line change 1+ import argparse
12import logging
23import os
34from pathlib import Path
@@ -50,14 +51,20 @@ def get_openai_config() -> dict:
5051 )
5152 load_dotenv (".env" , override = True )
5253
54+ parser = argparse .ArgumentParser (description = "Run evaluation with OpenAI configuration." )
55+ parser .add_argument ("--targeturl" , type = str , help = "Specify the target URL." )
56+ parser .add_argument ("--resultsdir" , type = str , help = "Specify the results directory." )
57+ parser .add_argument ("--numquestions" , type = int , help = "Specify the number of questions." )
58+
59+ args = parser .parse_args ()
60+
5361 openai_config = get_openai_config ()
54- # TODO: specify the localhost URL using argument
55- # TODO: specify the experiment name (based on PR number)
56- # TODO: Specify the num questions using arg CLI
5762
5863 run_evaluate_from_config (
5964 working_dir = Path (__file__ ).parent ,
6065 config_path = "eval_config.json" ,
66+ num_questions = args .num_questions ,
67+ target_url = args .target_url ,
68+ results_dir = args .results_dir ,
6169 openai_config = openai_config ,
62- num_questions = None ,
6370 )
You can’t perform that action at this time.
0 commit comments