Skip to content

Commit 5028981

Browse files
committed
Removed hard coded model version
1 parent 6fc5b8a commit 5028981

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llm-complete-guide/steps/bento_deployment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def bento_deployment(
3939
model_deployer = zenml_client.active_stack.model_deployer
4040
bentoml_deployment_config = BentoMLLocalDeploymentConfig(
4141
model_name=step_context.model.name,
42-
model_version="production",
42+
model_version=step_context.model.stage,
4343
description="Deploying RAG model",
4444
pipeline_name=pipeline_name,
4545
pipeline_step_name=step_name,

llm-complete-guide/steps/k8s_deployment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def apply_kubernetes_configuration(k8s_configs: list) -> None:
9696

9797
@step(enable_cache=False)
9898
def k8s_deployment(docker_image_tag: str, namespace: str = "default") -> Dict:
99+
step_context = get_step_context()
100+
99101
# Get the raw model name
100102
raw_model_name = get_step_context().model.name
101103
# Sanitize the model name
@@ -109,7 +111,7 @@ def k8s_deployment(docker_image_tag: str, namespace: str = "default") -> Dict:
109111
model_deployer = zenml_client.active_stack.model_deployer
110112
services = model_deployer.find_model_server(
111113
model_name=model_name,
112-
model_version="production",
114+
model_version=step_context.model.stage,
113115
)
114116

115117
# Read the K8s template

0 commit comments

Comments
 (0)