Release a new version, and roll back
Alice, the platform engineer, updates the model qwen-chat on eks-prod, rolls it back from the History tab by typing its name, and calls it from Python. Every deploy is a version, and a rollback shows its plan first.
Before you start
qwen-chat(your model deployment's name) running oneks-prod(your cluster's name).- For a release without a gap, a minimum of 2 replicas, set in step 3 of Scale the model with demand; with 1, the model has a gap while it is replaced.
1. Alice releases
Path: Workloads > Models > qwen-chat > Update
- Change one thing, such as Memory in Compute.
- Review, then apply.
The model returns to Running.
A pinned address (a Hugging Face commit, an OCI digest, an S3 version or a GCS generation) makes a rollback return the same bytes. A rollback deploys the old version anew; it does not undo database migrations or other data changes.
2. Alice rolls back
Path: Workloads > Models > qwen-chat > History
- Select Roll back on the previous version.
- Read the plan, then type
qwen-chatto confirm.
The plan shows a before and after, and notes that the endpoint keeps the access policy it has now. A version that served no endpoint cannot be rolled back to while the endpoint requires authentication; apply the specification you want instead.
It shows the plan and rolls back when you approve.
3. Alice calls the model the way Bob will
Path: Workloads > Models > qwen-chat > Call it from code
- Run the console's code with a key the policy accepts, such as Bob's.
from astropulse import Client
from openai import OpenAI
ap = Client() # reads ASTROPULSE_API_KEY
application = ap.applications.get_application("qwen-chat")
client = OpenAI(base_url=application.data.model.external_endpoint,
api_key="<key the policy accepts>")
response = client.chat.completions.create(
model="<model-name>", # the name shown in Call it from code
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)