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

last peice of the code is not working #2

Open
sanaakaddoura1 opened this issue Jul 7, 2023 · 1 comment
Open

last peice of the code is not working #2

sanaakaddoura1 opened this issue Jul 7, 2023 · 1 comment

Comments

@sanaakaddoura1
Copy link

Hello,
Thank you for this detailed tutorial. Your further support in my issue is appreciated.

I am not getting any problem except the last piece of code when I try to model. I am getting this error:

InvalidRequestError: Must provide an 'engine' or 'model' parameter to create a <class 'openai.api_resources.completion.Completion'>

this is appearing on this part of the code:

answer = openai.Completion.create(
model=fine_tuned_model,
prompt=new_prompt,
max_tokens=10, # Change amount of tokens for longer completion
temperature=0
)
answer['choices'][0]['text']

Hint: This part of the code is printing "none":

if fine_tune_response.fine_tuned_model == None:
fine_tune_list = openai.FineTune.list()
fine_tuned_model = fine_tune_list['data'][0].fine_tuned_model
print("none")

@norahsakal
Copy link
Owner

Hi!

Thanks for getting in touch.

One thing I've seen, and which I added to the blog post, is troubleshooting if your variable fine_tuned_model is null/None, which yours seems to be.

Have you tried to call this function with your fine_tune_response.id variable
-> retrieve_response = openai.FineTune.retrieve(fine_tune_response.id)

Like this:
Fine-tuning debug

You can read about it more here, in section 7. Save fine-tuned model in the blog post: https://norahsakal.com/blog/fine-tune-gpt3-model

I hope this helps, if not, feel free to reach out again, I'm happy to help so you can get your model up and running.

Let me know how it goes!

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