try-this-model / cache-working-models.sh
wxgeorge's picture
:wrench: include unhealthy models in model cache as we expect this state to be transient.
8f28494
raw
history blame
No virus
256 Bytes
#!/bin/bash
my_jq_query=$(cat << JQ
[.data[] | select(.status | test("idle|live|unhealthy"))]
| [group_by(.model_class)[] | { key: .[0].model_class, value: ([.[].id] | sort) }] | from_entries
JQ
)
capi /v1/models | jq "$my_jq_query" > model-cache.json