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:
136
136
137
137
- name : Evaluate local RAG flow
138
138
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
140
141
141
142
- name : Upload server logs as build artifact
142
143
uses : actions/upload-artifact@v4
@@ -154,7 +155,7 @@ jobs:
154
155
uses : actions/upload-artifact@v4
155
156
with :
156
157
name : eval_result
157
- path : ./src/api/evaluate/eval_results.jsonl
158
+ path : ./evals/results/pr${{ github.event.pull_request.number }}
158
159
159
160
- name : GitHub Summary Step
160
161
if : ${{ success() }}
Original file line number Diff line number Diff line change
1
+ import argparse
1
2
import logging
2
3
import os
3
4
from pathlib import Path
@@ -50,14 +51,20 @@ def get_openai_config() -> dict:
50
51
)
51
52
load_dotenv (".env" , override = True )
52
53
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
+
53
61
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
57
62
58
63
run_evaluate_from_config (
59
64
working_dir = Path (__file__ ).parent ,
60
65
config_path = "eval_config.json" ,
66
+ num_questions = args .num_questions ,
67
+ target_url = args .target_url ,
68
+ results_dir = args .results_dir ,
61
69
openai_config = openai_config ,
62
- num_questions = None ,
63
70
)
You can’t perform that action at this time.
0 commit comments