feature/cn-gpt #21
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/cn-gpt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
使用了国内百度的大模型——文心一言api代替openai的GPT模型
py -m unittest ─╯
未找到 JSON 数据
FEE./home/sangge/code/BackDoorBuster/tests/test_backdoor_detection.py:75: UserWarning: OPENAI_API_KEY is not set, test skipped.
warnings.warn("OPENAI_API_KEY is not set, test skipped.", UserWarning)
s/home/sangge/code/BackDoorBuster/tests/test_backdoor_detection.py:63: UserWarning: OPENAI_API_KEY is not set, test skipped.
warnings.warn("OPENAI_API_KEY is not set, test skipped.", UserWarning)
s.....Results have been saved as output.txt
.....
ERROR: test_gpt_no_risk_detection (tests.test_CN_GPT_detection.TestBackdoorDetection.test_gpt_no_risk_detection)
if os.getenv("BAIDU_API_KEY") is None or os.getenv("BAIDU_SECRET_KEY") is None:
Traceback (most recent call last):
File "/home/sangge/code/BackDoorBuster/tests/test_CN_GPT_detection.py", line 34, in test_gpt_no_risk_detection
self.assertEqual(len(results2["high"]), 0)
~~~~~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'
======================================================================
ERROR: test_gpt_risk_detection (tests.test_CN_GPT_detection.TestBackdoorDetection.test_gpt_risk_detection)
if os.getenv("BAIDU_API_KEY") is None or os.getenv("BAIDU_SECRET_KEY") is None:
Traceback (most recent call last):
File "/home/sangge/code/BackDoorBuster/tests/test_CN_GPT_detection.py", line 21, in test_gpt_risk_detection
self.assertEqual(len(results1["high"]), 3)
~~~~~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'
======================================================================
FAIL: test_gpt_env_no_set (tests.test_CN_GPT_detection.TestBackdoorDetection.test_gpt_env_no_set)
if os.getenv("BAIDU_API_KEY") is not None or os.getenv("BAIDU_SECRET_KEY") is not None:
Traceback (most recent call last):
File "/home/sangge/code/BackDoorBuster/tests/test_CN_GPT_detection.py", line 44, in test_gpt_env_no_set
with self.assertRaises(ValueError):
AssertionError: ValueError not raised
Ran 16 tests in 18.936s
FAILED (failures=1, errors=2, skipped=2)
你这个真能过测试吗???