MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / run_eval

Function run_eval

eval_general/eval_mt_bench_tgi.py:20–38  ·  view source on GitHub ↗
(
    model_id,
    question_file,
    answer_file,
    host, 
    port
)

Source from the content-addressed store, hash-verified

18import multiprocessing as mp
19
20def run_eval(
21 model_id,
22 question_file,
23 answer_file,
24 host,
25 port
26):
27 questions = load_questions(question_file, None, None)
28 random.shuffle(questions)
29
30 chunk_size = len(questions)
31 for i in range(0, len(questions), chunk_size):
32 get_model_answers(
33 model_id,
34 questions[i : i + chunk_size],
35 answer_file,
36 host,
37 port,
38 )
39
40def query_model(x):
41 question, host, port = x

Callers 1

Calls 1

get_model_answersFunction · 0.85

Tested by

no test coverage detected