File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: Apache-2.0
2+
3+ # Standard
4+ import os
5+
6+ # First Party
7+ from instructlab .eval .mt_bench_common import Judge
8+ from instructlab .eval .mt_bench_judgment import load_judge_prompts , make_judge_single
9+
10+
11+ def test_make_judge_single ():
12+ judge_file = os .path .join (
13+ os .path .dirname (__file__ ),
14+ ".." ,
15+ "src" ,
16+ "instructlab" ,
17+ "eval" ,
18+ "data" ,
19+ "mt_bench" ,
20+ "judge_prompts.jsonl" ,
21+ )
22+ judge_prompts = load_judge_prompts (judge_file )
23+ judges = make_judge_single ("prometheus-8x7b-v2-0" , judge_prompts )
24+ assert len (judges ) == 4
25+ assert isinstance (judges ["default" ], Judge )
26+ assert isinstance (judges ["math" ], Judge )
27+ assert judges ["math" ].ref_based
28+ assert isinstance (judges ["default-mt" ], Judge )
29+ assert judges ["default-mt" ].multi_turn
30+ assert isinstance (judges ["math-mt" ], Judge )
31+ assert judges ["math-mt" ].ref_based
32+ assert judges ["math-mt" ].multi_turn
You can’t perform that action at this time.
0 commit comments