Closed rhatdan closed 2 weeks ago
This PR enhances the model removal functionality by adding a fallback mechanism. If removing a model as an Ollama or Huggingface model fails, the system will attempt to remove it as an OCI container image before raising the original error.
sequenceDiagram
participant User
participant CLI as Ramalama CLI
participant Model as Model
participant OCI as OCI Image
User->>CLI: Request to remove model
CLI->>Model: Attempt to remove as Ollama/Huggingface
alt Removal successful
Model-->>CLI: Model removed
else Removal fails
CLI->>OCI: Attempt to remove as OCI Image
alt OCI removal successful
OCI-->>CLI: OCI Image removed
else OCI removal fails
CLI-->>User: Raise original error
end
end
Change | Details | Files |
---|---|---|
Added fallback logic for model removal |
|
ramalama/cli.py |
Updated system test for model removal |
|
test/system/050-pull.bats |
Summary by Sourcery
Implement a fallback mechanism to remove a model as an OCI Image if removal as Ollama or Huggingface fails, and update the system test accordingly.
Bug Fixes:
Tests: