From f711778145b2939627ebbddb64978a5e37e496d0 Mon Sep 17 00:00:00 2001 From: zhulin1 Date: Mon, 1 Jul 2024 13:02:34 +0800 Subject: [PATCH] update --- tests/test_hf_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_hf_model.py b/tests/test_hf_model.py index 5e29738..c810f1e 100644 --- a/tests/test_hf_model.py +++ b/tests/test_hf_model.py @@ -213,12 +213,12 @@ class TestReward: score2 = model.get_score(tokenizer, chat_2) print('score1: ', score1) print('score2: ', score2) - assert score1 > 0.5 & score1 < 1 & score2 < 0 + assert score1 > 0 & score2 < 0 # batch inference, get multiple scores at once scores = model.get_scores(tokenizer, [chat_1, chat_2]) print('scores: ', scores) - assert scores[0] > 0.5 & scores[0] < 1 & scores[1] < 0 + assert scores[0] > 0 & scores[1] < 0 # compare whether chat_1 is better than chat_2 compare_res = model.compare(tokenizer, chat_1, chat_2)