@@ -109,20 +109,21 @@ def check_deployment(api: pykube.HTTPClient, client: any, ev: dict):
109109 current_model_ID_label = model_attribute (model , "modelid_label" )
110110
111111 if dry_run :
112- pod_ip_list = "127.0.0.4"
113- try :
114- pod_ip_list = []
115- if is_standalone_deployment (ev ):
116- pods = client .CoreV1Api ().list_namespaced_pod (namespace = ev ["vllm_common_namespace" ])
117- for pod in pods .items :
118- if pod_string in pod .metadata .name :
112+ pod_ip_list = ["127.0.0.4" ]
113+ else :
114+ try :
115+ pod_ip_list = []
116+ if is_standalone_deployment (ev ):
117+ pods = client .CoreV1Api ().list_namespaced_pod (namespace = ev ["vllm_common_namespace" ])
118+ for pod in pods .items :
119+ if pod_string in pod .metadata .name :
120+ pod_ip_list .append (pod .status .pod_ip )
121+ else :
122+ pods = client .CoreV1Api ().list_namespaced_pod (namespace = ev ["vllm_common_namespace" ], label_selector = f"llm-d.ai/model={ current_model_ID_label } ,llm-d.ai/role={ pod_string } " )
123+ for pod in pods .items :
119124 pod_ip_list .append (pod .status .pod_ip )
120- else :
121- pods = client .CoreV1Api ().list_namespaced_pod (namespace = ev ["vllm_common_namespace" ], label_selector = f"llm-d.ai/model={ current_model_ID_label } ,llm-d.ai/role={ pod_string } " )
122- for pod in pods .items :
123- pod_ip_list .append (pod .status .pod_ip )
124- except client .ApiException as e :
125- announce (f"ERROR: Unable to find pods in namespace { ev ['vllm_common_namespace' ]} : { e } " )
125+ except client .ApiException as e :
126+ announce (f"ERROR: Unable to find pods in namespace { ev ['vllm_common_namespace' ]} : { e } " )
126127
127128 if not pod_ip_list :
128129 announce (f"ERROR: Unable to find IPs for pods \" { pod_string } \" !" )
@@ -131,7 +132,7 @@ def check_deployment(api: pykube.HTTPClient, client: any, ev: dict):
131132 for pod_ip in pod_ip_list :
132133 announce (f" 🚀 Testing pod ip \" { pod_ip } \" ..." )
133134 if dry_run :
134- announce (f" ✅ Pod ip \" { pod_ip } \" responded successfully ({ current_model } )" )
135+ announce (f" ✅ [DRY RUN] Pod ip \" { pod_ip } \" responded successfully ({ current_model } )" )
135136 else :
136137 image_url = get_image (ev ['llmd_image_registry' ], ev ['llmd_image_repo' ], ev ['llmd_image_name' ], ev ['llmd_image_tag' ])
137138 received_model_name , curl_command_used = get_model_name_from_pod (ev ['vllm_common_namespace' ], image_url , pod_ip , ev ['vllm_common_inference_port' ])
@@ -144,7 +145,7 @@ def check_deployment(api: pykube.HTTPClient, client: any, ev: dict):
144145 announce (f"🚀 Testing service/gateway \" { service_ip } \" (port 80)..." )
145146
146147 if dry_run :
147- announce (f"✅ Service responds successfully ({ current_model } )" )
148+ announce (f"✅ [DRY RUN] Service responds successfully ({ current_model } )" )
148149 else :
149150 image_url = get_image (ev ['llmd_image_registry' ], ev ['llmd_image_repo' ], ev ['llmd_image_name' ], ev ['llmd_image_tag' ])
150151 received_model_name , curl_command_used = get_model_name_from_pod (ev ['vllm_common_namespace' ], image_url , service_ip , "80" )
0 commit comments