FreedomIntelligence / CMB

CMB, A Comprehensive Medical Benchmark in Chinese
Apache License 2.0
134 stars 13 forks source link

直接运行baichuan-13b-chat时候出现'type' object is not subscriptable #6

Closed chenchch94 closed 1 year ago

chenchch94 commented 1 year ago

下载数据后尝试运行bash generate_fewshot.sh,出现以下问题: Traceback (most recent call last): File "./src/generate_fewshot.py", line 6, in from constants import id2worker_class File "/vepfs/chenchucheng/code/glm/CMB-main/src/constants.py", line 6, in from workers.huatuo_chat import HuatuoChatWorker File "/vepfs/chenchucheng/code/glm/CMB-main/src/../workers/huatuo_chat.py", line 2, in from .base import * File "/vepfs/chenchucheng/code/glm/CMB-main/src/../workers/base.py", line 20, in class BaseWorker(): File "/vepfs/chenchucheng/code/glm/CMB-main/src/../workers/base.py", line 239, in BaseWorker def generate_fewshot_examples(self, data: list[dict], use_cot=False): TypeError: 'type' object is not subscriptable

直接在line6就出现报错,感觉是代码问题?是否有遇到过呢?

chenchch94 commented 1 year ago

./CMB-main/src/../workers/base.py 的line293、line312也是同样的问题

chenchch94 commented 1 year ago

在CMB-main文件下进入python环境后,直接运行from workers.base import *,就出现上面问题了。

chenchch94 commented 1 year ago

需要什么样的运行环境呢?

g-h-chen commented 1 year ago

@chenchch94 Hii, thanks for your issue.

Good luck.

g-h-chen commented 1 year ago

需要什么样的运行环境呢?

@chenchch94 We've added some badges showing the versions of Python and major packages.

chenchch94 commented 1 year ago

@g-h-chen thanks