Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_instruction.py报错 #11

Closed
MingJiaAn opened this issue Mar 22, 2023 · 2 comments
Closed

generate_instruction.py报错 #11

MingJiaAn opened this issue Mar 22, 2023 · 2 comments

Comments

@MingJiaAn
Copy link

Traceback (most recent call last):
File "generate_instruction.py", line 24, in
import utils
File "/mnt/amj/chatgpt/BELLE/utils.py", line 40, in
prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]],
TypeError: 'type' object is not subscriptable
(chatgpt) [root@iZ2zecged3txs683zzjfnpZ BELLE]# python3 generate_instruction.py generate_instruction_following_data --api=chat --model_name=gpt-3.5-turbo
Traceback (most recent call last):
File "generate_instruction.py", line 24, in
import utils
File "/mnt/amj/chatgpt/BELLE/utils.py", line 40, in
prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]],
TypeError: 'type' object is not subscriptable

麻烦看下如何解决

@Monstarrr
Copy link

这个好像是python的版本问题,更新python版本或者from future import annotations

@bestpredicts
Copy link
Collaborator

这个好像是python的版本问题,更新python版本或者from future import annotations

应该是python版本的问题。我这里python3.9下面执行没问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants