litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: health check error with audio_transcription model on cli tool

Open lloukmane opened this issue 1 year ago • 8 comments

What happened?

When trying to perform a health check on the Azure OpenAI Whisper model (/health endpoint), I encountered an error stating that the audio file gettysburg.wav was not found.

Litellm version : 1.48.5 Mode is set to audio_transcription, as described in the documentation : https://docs.litellm.ai/docs/proxy/health#speech-to-text-models

It seems that the path is incorrect: /usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav. The file is actually located at /usr/local/lib/python3.11/site-packages/litellm/tests/gettysburg.wav.

Relevant log output

[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n  File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5239, in ahealth_check\n    response = await azure_chat_completions.ahealth_check(\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1834, in ahealth_check\n    audio_file = open(file_path, \"rb\")\n                 ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\n

Twitter / LinkedIn details

No response

lloukmane avatar Oct 01 '24 15:10 lloukmane

Hi @lloukmane , thanks for using LiteLLM. Any chance we can hop on a call to learn how we can improve LiteLLM Proxy for you ?

We’re planning roadmap and I’d love to get your feedback

my cal for your convenience: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat my linkedin if you prefer DMs: https://www.linkedin.com/in/reffajnaahsi/

ishaan-jaff avatar Oct 03 '24 11:10 ishaan-jaff

Hello,
I'm still encountering the error with litellm version 1.48.10. The path has been modified for the OpenAI provider but not for AzureOpenAI.

[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n  File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5255, in ahealth_check\n    response = await azure_chat_completions.ahealth_check(\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1814, in ahealth_check\n    audio_file = open(file_path, \"rb\")\n                 ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\n

lloukmane avatar Oct 03 '24 13:10 lloukmane

Hi @lloukmane fix pushed - https://github.com/BerriAI/litellm/commit/9f3583b2b1590ac0be7ceee0233af605ebf1961c


Can we do a ~10min call this/next week? Would love to learn how you're using litellm

Attaching our calendly for convenience: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat

krrishdholakia avatar Oct 03 '24 16:10 krrishdholakia

Hello, I'm still encountering the error with litellm version 1.48.12.

[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../../../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n  File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5257, in ahealth_check\n    response = await azure_chat_completions.ahealth_check(\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1819, in ahealth_check\n    audio_file = open(file_path, \"rb\")\n                 ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../../../tests/gettysburg.wav'\n

lloukmane avatar Oct 04 '24 09:10 lloukmane

@krrishdholakia I'm also still encountering this issue.

InventoCasa avatar Oct 08 '24 11:10 InventoCasa

It looks like y'all are using the cli tool, not the docker image.

The .wav file is no longer in the cli tool (reducing size of python sdk).

What would the ideal solution here look like? @lloukmane @InventoCasa

krrishdholakia avatar Oct 08 '24 14:10 krrishdholakia

It looks like y'all are using the cli tool, not the docker image.

The .wav file is no longer in the cli tool (reducing size of python sdk).

What would the ideal solution here look like? @lloukmane @InventoCasa

Hi, I'm using docker.

InventoCasa avatar Oct 08 '24 15:10 InventoCasa

It looks like y'all are using the cli tool, not the docker image. The .wav file is no longer in the cli tool (reducing size of python sdk). What would the ideal solution here look like? @lloukmane @InventoCasa

Hi, I'm using docker.

Hi, I'm also using Docker.

lloukmane avatar Oct 08 '24 15:10 lloukmane

Quick hack to fix the docker...

RUN mkdir /usr/local/lib/python3.11/site-packages/tests
COPY ./gettysburg.wav /usr/local/lib/python3.11/site-packages/tests

sfarthin avatar Dec 11 '24 14:12 sfarthin

fixed here: https://github.com/BerriAI/litellm/pull/7455 - we use an internal .mp3 file for the health check

ishaan-jaff avatar Dec 29 '24 02:12 ishaan-jaff