Stream interrupted (client disconnected) during fine_tunes.follow

Hi All,

When running the following command

openai api fine_tunes.follow -i {MY-JOB-ID}

I often get the following error after about a minute

Stream interrupted (client disconnected).

Is this a common problem or is there likely something wrong at my end with my internet connection or windows settings?

Yes, it’s a common issue.

2 Likes

Hi All, :slight_smile:

Is there any updated solution to this error. I am still getting the error (Stream interrupted (client disconnected).)
I tried to degrade the version openai to 0.25.0 and even tried with the latest version of openAI.

If there is any solution to solve this error, please let me know.

Thank you :slight_smile:

3 Likes

Hi Priya1,

I have had the same issue till now. Did you get any progress on it?

No resolution yet.
If anyone has any solution it seems like multiple people are looking.

Hi racarr202,

I tried again this morning. It looks okay now. You may want to retry

I often get this error as well, sometimes it works, most of the time I get this error, it’s not clear what’s actually happening.

If you get any solution on this error,
please give that , am also facing same error, not getting any right solution that.

Hi @davidyhchen , did get any output on this error?

Hi Billunaveen,

I faced the same problem and same info. The interesting thing is one day after when I checked again, they informed the process has been completed successfully. Not sure why but it is what I experienced. Hope it helps!

Regards,
David

You will get better results if you refrain from using the CLI and move to Python, Ruby or another object-oriented scripting language.

FYI, I use Ruby and never see these kinds of errors you are experiencing.

HTH

:slight_smile:

I’ll give that a go next time.

> “FYI, I use Ruby and never see these kinds of errors you are experiencing”

I How are you using Ruby? I thaught the API was only available for Python.

Why would you thnk that @racarr202 ?

:slight_smile:

https://platform.openai.com/docs/api-reference/introduction
…apparently it’s because I can’t read.

Just to be clear though, only python and Node.js are ‘officially’ supported.

You’re using one of the community led API’s, correct?

I am not following you at all, @racarr202 , sorry about that.

OpenAI provides 2 API wrappers yes, but so do others. These are just API wrappers. OpenAI is kind enough to provide two. There are wrappers for many programming languages and many work very good, like the Ruby gem ruby-openai which is a great API wrapper, works flawlessly.

See this OpenAI page for a list of all libs:

OpenAI Libraries

:slight_smile:

2 Likes

While the command line API didn’t work, the Python API worked for me:

openai.FineTune.retrieve(id="<fine_tune_id>")

1 Like

Good news: stream interrupted is only preventing you from viewing progress not actually fine tuning. To reinitiate your stream and check progress call your api key then use: openai --api-key APIKEY api fine_tunes.follow -i FINETUNEID to reinitiate your stream and follow your progress.

2 Likes

The error does not mean that your model is not being created. Wait an hour and check the status again with the code that it tells you. it sure works!

1 Like

openai api fine_tunes.follow -i ft-L68gCxl9xH1Cf6JZ7HYGevDV Stream interrupted (client disconnected). To resume the stream, run:

I followed the link “list fine-tunes endpoint”, use below format and replace $OPENAI_API_KEY with my openai API string, quickly I can retrieve several results of my previous attempts.

curl https://api.openai.com/v1/fine-tunes \
  -H "Authorization: Bearer $OPENAI_API_KEY"