From ac00b7deee093773ee2f42f2694746dfbbd8163f Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期四, 15 六月 2023 16:53:26 +0800
Subject: [PATCH] update repo

---
 tests/test_sv_inference_pipeline.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tests/test_sv_inference_pipeline.py b/tests/test_sv_inference_pipeline.py
index 265f839..95ca3ab 100644
--- a/tests/test_sv_inference_pipeline.py
+++ b/tests/test_sv_inference_pipeline.py
@@ -1,5 +1,6 @@
 import unittest
 
+import numpy as np
 from modelscope.pipelines import pipeline
 from modelscope.utils.constant import Tasks
 from modelscope.utils.logger import get_logger
@@ -36,12 +37,13 @@
         same_cos = np.sum(enroll * same) / (np.linalg.norm(enroll) * np.linalg.norm(same))
         same_cos = max(same_cos - sv_threshold, 0.0) / (1.0 - sv_threshold) * 100.0
         logger.info("Similarity: {}".format(same_cos))
+        assert int(same_cos) == 85
 
         # 瀵逛笉鍚岀殑璇磋瘽浜鸿绠椾綑寮︾浉浼煎害
         diff_cos = np.sum(enroll * different) / (np.linalg.norm(enroll) * np.linalg.norm(different))
         diff_cos = max(diff_cos - sv_threshold, 0.0) / (1.0 - sv_threshold) * 100.0
         logger.info("Similarity: {}".format(diff_cos))
-
+        assert int(diff_cos) == 0.0
 
 if __name__ == '__main__':
     unittest.main()

--
Gitblit v1.9.1