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

utils.py and openai==0.8.0 TypeError: 'type' object is not subscriptable #33

Open
zql022 opened this issue Oct 26, 2023 · 1 comment
Open

Comments

@zql022
Copy link

zql022 commented Oct 26, 2023

this code ./src/utils.py
line 47 return_text=False in
def openai_completion(
prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]],
decoding_args: OpenAIDecodingArguments,
model_name="text-davinci-003",
sleep_time=2,
batch_size=1,
max_instances=sys.maxsize,
max_batches=sys.maxsize,
return_text=False,
shows this error:
File "train.py", line 27, in
import utils
File "/home/llama/Llama-X-main/src/utils.py", line 47, in
return_text=False,
TypeError: 'type' object is not subscriptable

my openai==0.8.0,deepspeed==0.10.0,and other pip in requirements.txt , After changed the transformer version to 4.29.2 but i can't slove this error, maybe some pip version are not true, if anyone have some suggestion, please leave your comment here,thank you very much!

@dongguanting
Copy link

@zql022 have you solved it, i have same problem.

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

2 participants