Skip to content
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

feat: graceful failure without model's YAML config #1127

Open
jamesbraza opened this issue Oct 2, 2023 · 2 comments
Open

feat: graceful failure without model's YAML config #1127

jamesbraza opened this issue Oct 2, 2023 · 2 comments
Labels
enhancement New feature or request up for grabs Tickets that no-one is currently working on

Comments

@jamesbraza
Copy link
Contributor

jamesbraza commented Oct 2, 2023

LocalAI version:

e029cc6

Environment, CPU architecture, OS, and Version:

Darwin N7L493PWK4 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

Describe the bug

When you don't have a YAML config in models/, you can get an obscure and large error response, not directly related to the actual underlying issue.

To Reproduce

Using llama-2-13b-ensemble-v5.Q4_K_M.gguf downloaded using huggingface_hub.hf_hub_download:

> ls models
llama-2-13b-ensemble-v5.Q4_K_M.gguf
> curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
     "model": "llama-2-13b-ensemble-v5.Q4_K_M",
     "messages": [{"role": "user", "content": "What is an alpaca?"}],
     "temperature": 0.1
   }' | jq .
...
{
  "error": {
    "code": 500,
    "message": "could not load model - all backends returned error: 25 errors occurred:\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unknown desc = failed loading model\n\t* could not load model: rpc error: code = Unavailable desc = error reading from server: EOF\n\t* could not load model: rpc error: code = Unknown desc = stat /models/llama-2-13b-ensemble-v5.Q4_K_M: no such file or directory\n\t* could not load model: rpc error: code = Unknown desc = stat /models/llama-2-13b-ensemble-v5.Q4_K_M: no such file or directory\n\t* could not load model: rpc error: code = Unknown desc = unsupported model type /models/llama-2-13b-ensemble-v5.Q4_K_M (should end with .onnx)\n\t* backend unsupported: /build/extra/grpc/huggingface/huggingface.py\n\t* backend unsupported: /build/extra/grpc/autogptq/autogptq.py\n\t* backend unsupported: /build/extra/grpc/bark/ttsbark.py\n\t* backend unsupported: /build/extra/grpc/diffusers/backend_diffusers.py\n\t* backend unsupported: /build/extra/grpc/exllama/exllama.py\n\t* backend unsupported: /build/extra/grpc/vall-e-x/ttsvalle.py\n\t* backend unsupported: /build/extra/grpc/vllm/backend_vllm.py\n\n",
    "type": ""
  }
}

Expected behavior

I expect a concise and simple error message stating the actual issue (which was not having a model YAML config made), not a ton of semi-related rpc error: code = Unknown desc.

Logs

Here are logs in the docker compose container (run without --detach):

localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:38781: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:39685: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:46393: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:37429: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:43713: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:38897: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:34381: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:35537: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:38983: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:36063: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:37487: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:36697: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:34451: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:35385: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:43293: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:42347: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:36319: connect: connection refused"
localai-api-1  | rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:42321: connect: connection refused"

Additional context

#1069 (comment)

@jamesbraza jamesbraza added the bug Something isn't working label Oct 2, 2023
@lunamidori5 lunamidori5 self-assigned this Oct 3, 2023
@mudler
Copy link
Owner

mudler commented Nov 25, 2023

this is up for grabs - and indeed there is a lot of room of optimizations into logging here

@mudler mudler added the up for grabs Tickets that no-one is currently working on label Nov 25, 2023
@mudler
Copy link
Owner

mudler commented Nov 25, 2023

I don't think we are chasing any bug here, but rather asking for better output. treating it as a feature request

@mudler mudler added enhancement New feature or request and removed bug Something isn't working labels Nov 25, 2023
@mudler mudler changed the title Bug: graceful failure without model's YAML config feat: graceful failure without model's YAML config Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request up for grabs Tickets that no-one is currently working on
Projects
None yet
Development

No branches or pull requests

3 participants