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

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

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 10
  • Comments: 41 (4 by maintainers)

Most upvoted comments

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.

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

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

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

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

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

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