Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[0.26.0] openai/cli.py:440: RuntimeWarning: coroutine 'FineTune.stream_events' was never awaited #173

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

Closed
blshkv opened this issue Jan 8, 2023 · 41 comments · Fixed by #176

Comments

@blshkv
Copy link

blshkv commented Jan 8, 2023

bash$ openai api fine_tunes.create -t ./train_test_prepared.jsonl -m davinci
Upload progress: 100%|██████████████████████████████████████████████████████████████████████████████| 112/112 [00:00<00:00, 88.5kit/s]
Uploaded file from ./train_test_prepared.jsonl: file-ppEDNe0p6EomteEp3JFbBoFp
Created fine-tune: ft-u9KskmmvSnBtVc4VDfbe7lyr
Streaming events until fine-tuning is complete...

(Ctrl-C will interrupt the stream, but not cancel the fine-tune)

Stream interrupted (client disconnected).
To resume the stream, run:

  openai api fine_tunes.follow -i ft-u9KskmmvSnBtVc4VDfbe7lyr

/usr/lib/python3.10/site-packages/openai/cli.py:406: RuntimeWarning: coroutine 'FineTune.stream_events' was never awaited
  cls._stream_events(resp["id"])
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

it is working fine with 0.25.0

may be related: dev-python/aiohttp-3.8.3

@pablondrina
Copy link

Same here for me. I thought it might be incompatible with my Python version (3.10), but it only worked when I installed version 0.25 of the package (pip install openai==0.25.0)

@marialiguzmanadan
Copy link

I have this same problem with version 0.25.0. Is there any other solution to this?

@mohsspark829
Copy link

Hi there,
I have the same issue even with 0.25.0 and 0.24.0
C:\Users\admindev\GPT>openai api fine_tunes.follow -i ft-mM9Fk2xqRQTtqbt7clQLheRf
[2023-01-12 13:00:28] Created fine-tune: ft-mM9Fk2xqRQTtqbt7clQLheRf

Stream interrupted (client disconnected).
To resume the stream, run:

openai api fine_tunes.follow -i ft-mM9Fk2xqRQTtqbt7clQLheRf

and pip list output
image

Is there any solution for this problem?

@ddeville
Copy link
Contributor

Hey folks, the FineTune.stream_events method was made async by mistake, rather than adding an additional async version. We'll have a fix shortly.

@mohsspark829
Copy link

Hey @ddeville, Great, thanks for the update!

@castroalves
Copy link

Hey guys, I'm facing that same issue. I'm using openai version 0.26.0.

@mohsspark829
Copy link

mohsspark829 commented Jan 12, 2023

Hi there, thank you for the update.
I still have the same problem , my fine tune models from yesterday has been published successfully but cannot do a new one even after using 0.26.0

with 0.25 and 0.24 I am getting this error:
image

with 0.26 I am getting this error:
image

Not sure whether I need to open a new issue or continue here

@ddeville
Copy link
Contributor

I'm not sure about the error on 0.24 and 0.25 but for the one you're seeing on 0.26, it will be fixed as soon as we release the next minor version with the fix.

@mohsspark829
Copy link

Thanks @ddeville for the update, do you have any estimate on the next minor release? I may consider using one of the older versions for the POC I am working on,

@ddeville
Copy link
Contributor

Not entirely sure but trying to get something before end of week.

@mohsspark829
Copy link

Great thanks, really appreciate this

@thehappydinoa
Copy link

Had this same issue, I applied the patch from the MR and it appears to be working now.

@ddeville
Copy link
Contributor

Hey folks, we've just published 0.26.1 that includes the fix for this bug.

@elijahschrockAGT
Copy link

I'm still receiving this error, and I can confirm my version has been upgraded to 0.26.1
image

Anybody else or is this just me?

@mohsspark829
Copy link

Hi @elijahschrockAGT , I think it might be a problem at your side, thanks to the dev team including @ddeville , v 26.1 works fine for me as shown below
image

@elijahschrockAGT
Copy link

@mohsspark829 Okay that's good to know. Thank you for the response! I'll take a deeper look into it today

@oficial-moss
Copy link

I am having the same problem, tried with version 0.25 and 0.26.1 but keep showing the same error

RuntimeWarning: coroutine 'FineTune.stream_even

@mohsspark829 @ddeville can u guys help me?
image

@rezaloo75
Copy link

I am running into the exact same problem whether I use 0.25 or 0.26.

@shlumper
Copy link

shlumper commented Jan 20, 2023

@ddeville need your help please having the same issue with openai-0.26.1

Created fine-tune: ft-zzzzzzz
Streaming events until fine-tuning is complete...

(Ctrl-C will interrupt the stream, but not cancel the fine-tune)
[2023-01-20 21:00:42] Created fine-tune: ft-QuUrna0IUGSDkTai9rj4VnZU

Stream interrupted (client disconnected).
To resume the stream, run:

openai api fine_tunes.follow -i ft-zzzzzzz

@br185126
Copy link

br185126 commented Jan 21, 2023

same issue .. any update

[2023-01-20 21:04:08] Created fine-tune: ft-*****

Stream interrupted (client disconnected).
To resume the stream, run:

openai api fine_tunes.follow -i ft-*****

@mohsspark829
Copy link

mohsspark829 commented Jan 21, 2023 via email

@shlumper
Copy link

Hey all, in my case this was not an issue. This 'interuption' happens on my end with 0.26.1 but this is not due to a bug. I think it is related to session time out and job will be in the queue. The fine tuning process may take several days depens on the nunber of jobs in the queue. Cheers M

On Sat, 21 Jan 2023, 16:29 br185126, @.> wrote: same issue .. any update — Reply to this email directly, view it on GitHub <#173 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMJV5TDQMMOUMGIRESDWTNJ3HANCNFSM6AAAAAATUJXEU4 . You are receiving this because you were mentioned.Message ID: @.>

I gave it only 2 prompts to train on

@lily410
Copy link

lily410 commented Jan 26, 2023

Hey all, in my case this was not an issue. This 'interuption' happens on my end with 0.26.1 but this is not due to a bug. I think it is related to session time out and job will be in the queue. The fine tuning process may take several days depens on the nunber of jobs in the queue. Cheers M

On Sat, 21 Jan 2023, 16:29 br185126, @.> wrote: same issue .. any update — Reply to this email directly, view it on GitHub <#173 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMJV5TDQMMOUMGIRESDWTNJ3HANCNFSM6AAAAAATUJXEU4 . You are receiving this because you were mentioned.Message ID: @.>

I think you are right. My dataset is not large. When i use the model cuire, there is no response.When i change to ada, it works

@detailyang
Copy link

Workaround: loop to execute it until it's success

fish shell

while true; openai api fine_tunes.follow -i ft-xxxxxxxxx ; end

or

bash shell

while true; do openai api fine_tunes.follow -i ft-xxxxxxx ; done

@thehappydinoa
Copy link

I believe it also works if you just update openai to the latest version.

@sjonas50
Copy link

is everyone still having this issue? I keep getting the same interruption "Stream interrupted (client disconnected).", i'm hoping that its just the stream that is interrupted and not the fine-tune. Maybe just because of the amount fo tine tunes in the queue?

@mohsspark829
Copy link

mohsspark829 commented Feb 21, 2023 via email

@wallon-ai
Copy link

is everyone still having this issue? I keep getting the same interruption "Stream interrupted (client disconnected).", i'm hoping that its just the stream that is interrupted and not the fine-tune. Maybe just because of the amount fo tine tunes in the queue?

same error

@sjonas50
Copy link

sjonas50 commented Feb 22, 2023 via email

@quinnha
Copy link

quinnha commented Mar 4, 2023

Same issue here, keep getting stream interrupted (client disconnected). I'm just preloading a bunch of openai api fine_tunes.follow -i commands so it'll go through for now :(

@cchendyc
Copy link

cchendyc commented Mar 5, 2023

same issue when adding validation set

@muratali016
Copy link

the same issue still pops up on 3/8/2023

@gaurav-open-source
Copy link

Hey! any update on the issue? I am getting the same error. I've tried v0.25, v0.26, and 0.27 but no one is working.

@wesley974
Copy link

Same issue using openai 0.27.2.

@gaurav-open-source
Copy link

Hey! any update on the issue? I am getting the same error. I've tried v0.25, v0.26, and 0.27 but no one is working.

By using this command and spending around 3hrs (non-stop) it works. while true; do openai api fine_tunes.follow -i ft-xxxxxxx ; done

@cchendyc
Copy link

i end up using curie and that works for any v

@muratali016
Copy link

I'm getting this error all the time I try to tune it, but somehow I got a fine-tuned model in openai playground

@eyalfisher
Copy link

eyalfisher commented Mar 20, 2023

Getting the same error with 0.27.2, doesn't seem fixed @ddeville.

@ZzyChris97
Copy link

Getting the same error with openai==0.27.2 and python=3.9.12

@FosanzDev
Copy link

Same as well in 0.27.8. Packages installed:

  • requests // from openai // ver. 2.31.0
  • tqdm // from openai // ver. 4.65.0
  • aiohttp // from openai // ver. 3.8.4
  • charset-normalizer // from requests>=2.20 // ver. 3.1.0
  • idna // from requests>=2.20 // ver. 2.8
  • urllib3 // from requests>=2.20 // ver. 1.24.3
  • certifi // from requests>=2.20 // ver. 2022.12.7
  • attrs // from aiohttp // ver. 22.2.0
  • multidict // from aiohttp // ver. 6.0.4
  • async-timeout // from aiohttp // ver. 4.0.2
  • yarl // from aiohttp // ver. 1.8.2
  • frozenlist // from aiohttp // ver. 1.3.3
  • aiosignal // from aiohttp // ver. 1.3.1
  • colorama // from tqdm // ver. 0.4.6

@mgutierrezc
Copy link

Same error with openai==0.27.8 & python=3.9.16, and with openai==0.25.0 & python=3.9.16

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

Successfully merging a pull request may close this issue.