janhq / cortex.cpp

Local AI API Platform
https://cortex.so
Apache License 2.0
2.07k stars 116 forks source link

bug: `cortex pull invalid_url` creates a model folder #1270

Closed 0xSage closed 1 month ago

0xSage commented 1 month ago

Cortex version

v70

Describe the Bug

  1. cortex pull https://huggingface.co/cortexso/NONEXISTENT_MODEL
  2. Get "model downloaded successfully"
  3. Get "not a valid GGUF file"
  4. run ls /cortexcpp/models
  5. See that a model folder was created for "nonexistent model name"
❯ sudo cortex-nightly pull https://huggingface.co/cortexso/mistraaal
Validating download items, please wait..
Start downloading: mistraaal
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17228  100 17228    0     0  58595      0 --:--:-- --:--:-- --:--:-- 58798
Model mistraaal downloaded successfully!
Not a valid GGUF file
❯ ls
mistraaal    

Questions

  1. Whats our model download validation sequence?
  2. Is this a race condition or just bad sequencing?

What is your OS?

What engine are you running?

namchuai commented 1 month ago

This is a problem with verification of an url. I will work on this.

0xSage commented 1 month ago

still an issue on v115

gabrielle-ong commented 1 month ago

QA Mac, windows, ubuntu ✅ returns Invalid model handle: <invalid URL>