feature/cn-gpt #21

Merged
dqy merged 10 commits from feature/cn-gpt into main 2024-05-26 16:59:24 +08:00
Collaborator

使用了国内百度的大模型——文心一言api代替openai的GPT模型

使用了国内百度的大模型——文心一言api代替openai的GPT模型
ccyj added 4 commits 2024-05-16 21:21:40 +08:00
sangge added 1 commit 2024-05-17 16:06:04 +08:00
Merge branch 'main' into feature/cn-gpt
Some checks failed
Python application test / build (pull_request) Failing after 12m46s
8fed7af432
dqy added 1 commit 2024-05-18 20:59:46 +08:00
Merge branch 'main' into feature/cn-gpt
Some checks failed
Python application test / build (pull_request) Failing after 14m6s
44c6086b8c
Owner

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)
你这个真能过测试吗???

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) 你这个真能过测试吗???
ccyj added 2 commits 2024-05-24 17:29:24 +08:00
ccyj added 1 commit 2024-05-24 20:27:30 +08:00
ccyj added 1 commit 2024-05-24 20:48:07 +08:00
sangge approved these changes 2024-05-24 22:32:42 +08:00
dqy approved these changes 2024-05-26 16:59:14 +08:00
dqy merged commit c97780cde3 into main 2024-05-26 16:59:24 +08:00
dqy deleted branch feature/cn-gpt 2024-05-26 16:59:31 +08:00
Sign in to join this conversation.
No Reviewers
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sangge/BackDoorBuster#21
No description provided.