openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

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

Open blshkv opened this issue 1 year ago • 1 comments

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

blshkv avatar Jan 08 '23 02:01 blshkv

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)

pablondrina avatar Jan 10 '23 09:01 pablondrina

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

marialiguzmanadan avatar Jan 11 '23 23:01 marialiguzmanadan

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?

mohsspark829 avatar Jan 12 '23 00:01 mohsspark829

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.

ddeville avatar Jan 12 '23 00:01 ddeville

Hey @ddeville, Great, thanks for the update!

mohsspark829 avatar Jan 12 '23 00:01 mohsspark829

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

castroalves avatar Jan 12 '23 15:01 castroalves

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

mohsspark829 avatar Jan 12 '23 22:01 mohsspark829

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.

ddeville avatar Jan 12 '23 22:01 ddeville

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,

mohsspark829 avatar Jan 12 '23 22:01 mohsspark829

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

ddeville avatar Jan 12 '23 22:01 ddeville

Great thanks, really appreciate this

mohsspark829 avatar Jan 12 '23 23:01 mohsspark829

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

thehappydinoa avatar Jan 13 '23 20:01 thehappydinoa

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

ddeville avatar Jan 13 '23 20:01 ddeville

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?

elijahschrockAGT avatar Jan 13 '23 22:01 elijahschrockAGT

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

mohsspark829 avatar Jan 16 '23 23:01 mohsspark829

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

elijahschrockAGT avatar Jan 18 '23 18:01 elijahschrockAGT

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

oficial-moss avatar Jan 19 '23 23:01 oficial-moss

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

rezaloo75 avatar Jan 20 '23 06:01 rezaloo75

@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

shlumper avatar Jan 20 '23 19:01 shlumper

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-*****

br185126 avatar Jan 21 '23 03:01 br185126

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 https://github.com/openai/openai-python/issues/173#issuecomment-1399165678, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMJV5TDQMMOUMGIRESDWTNJ3HANCNFSM6AAAAAATUJXEU4 . You are receiving this because you were mentioned.Message ID: @.***>

mohsspark829 avatar Jan 21 '23 05:01 mohsspark829

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

shlumper avatar Jan 21 '23 14:01 shlumper

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

lily410 avatar Jan 26 '23 06:01 lily410

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

detailyang avatar Feb 14 '23 02:02 detailyang

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

thehappydinoa avatar Feb 14 '23 13:02 thehappydinoa

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?

sjonas50 avatar Feb 21 '23 18:02 sjonas50

Hi, submited a training file yesterday and it got disconnected but it has been submitted for fine tune. There is a command ( mentioned below) that shows you the fine tune processes/models that are happening/have been created so far along with their status and other info.

4

6 7 8 9 10# List all created fine-tunes openai api fine_tunes.list

On Wed, 22 Feb 2023, 07:52 sjonas50, @.***> wrote:

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?

— Reply to this email directly, view it on GitHub https://github.com/openai/openai-python/issues/173#issuecomment-1438949308, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMNATDHW4Q2F43JYH3LWYUFGNANCNFSM6AAAAAATUJXEU4 . You are receiving this because you were mentioned.Message ID: @.***>

mohsspark829 avatar Feb 21 '23 19:02 mohsspark829

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

wallon-ai avatar Feb 22 '23 02:02 wallon-ai

It ended up working after a while. Just give it time then you will see it gets added to the queue. Took about 3 hours.

On Tue, Feb 21, 2023 at 7:59 PM wallon-ai @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/openai/openai-python/issues/173#issuecomment-1439370631, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHISBMAHHNR2N6XF3UZN73WYV6ITANCNFSM6AAAAAATUJXEU4 . You are receiving this because you commented.Message ID: @.***>

sjonas50 avatar Feb 22 '23 03:02 sjonas50

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 :(

quinnha avatar Mar 04 '23 04:03 quinnha