Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Comments

Handle Untagged Models#33

Merged
ekcasey merged 4 commits intomainfrom
untagged-models
Apr 18, 2025
Merged

Handle Untagged Models#33
ekcasey merged 4 commits intomainfrom
untagged-models

Conversation

@ekcasey
Copy link
Contributor

@ekcasey ekcasey commented Apr 18, 2025

List

Display Multiple Tags

For models with multiple tags, model list displays one row per tag. This is important now that model tag allows users to apply extra tags to a model.

./model-cli list
MODEL NAME                                    PARAMETERS  QUANTIZATION    ARCHITECTURE  MODEL ID      CREATED      SIZE
ai/smollm2                                    361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB
index.docker.io/emilycasey003/smollm2:latest  361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB
index.docker.io/emilycasey003/demo:latest     361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB

Display Untagged Models

For models with zero tags model list displays "MODEL NAME" as <none>. This is important b/c repointing a tag with model tag or model pulling a new version may leave a model without a tag reference.

./model-cli list
MODEL NAME                                    PARAMETERS  QUANTIZATION    ARCHITECTURE  MODEL ID      CREATED      SIZE
ai/smollm2                                    361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB
index.docker.io/emilycasey003/smollm2:latest  361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB
emilycasey003/demo:latest                     361.82 M    IQ2_XXS/Q4_K_M  llama         354bf30d0aa3  3 weeks ago  256.35 MiB
<none>                                        183         Unknown         llama         8e29acb3019c  2 weeks ago  864 B

Inspect

model inspect can display data for untagged models when given a full or shortened ID. (previously this panicked)

./model-cli inspect 8e29acb3019c
{
  "id": "sha256:8e29acb3019cd9bfb04b90b6a77b1bff4ab7abb9dc3efe2fba18729343d5e6d5",
  "tags": null,
  "created": 1743622285,
  "config": {
    "format": "gguf",
    "quantization": "Unknown",
    "parameters": "183",
    "architecture": "llama",
    "size": "864 B"
  }
}
./model-cli inspect sha256:8e29acb3019cd9bfb04b90b6a77b1bff4ab7abb9dc3efe2fba18729343d5e6d5
{
  "id": "sha256:8e29acb3019cd9bfb04b90b6a77b1bff4ab7abb9dc3efe2fba18729343d5e6d5",
  "tags": null,
  "created": 1743622285,
  "config": {
    "format": "gguf",
    "quantization": "Unknown",
    "parameters": "183",
    "architecture": "llama",
    "size": "864 B"
  }
}

Remove

model rm can remove an untagged model by ID. This allows removal of untagged models. Previously this panicked

./model-cli rm 8e29acb3019c
Model sha256:8e29acb3019cd9bfb04b90b6a77b1bff4ab7abb9dc3efe2fba18729343d5e6d5 removed successfully

Known Issue - Removing tagged model by ID

model rm <id> reports successful removal of tagged model, but doesn't actually remove the model. The model must be untagged first.

Run

model run can run an untagged model by ID.

ekcasey added 3 commits April 18, 2025 11:02
Signed-off-by: Emily Casey <emily.casey@docker.com>
Signed-off-by: Emily Casey <emily.casey@docker.com>
Signed-off-by: Emily Casey <emily.casey@docker.com>
@ekcasey ekcasey marked this pull request as ready for review April 18, 2025 16:19
Copy link
Contributor

@xenoscopic xenoscopic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Signed-off-by: Emily Casey <emily.casey@docker.com>
@ekcasey ekcasey merged commit 18ca9fe into main Apr 18, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants