File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
ci/L0_backend_vllm/metrics_test Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ set -e
114114kill $SERVER_PID
115115wait $SERVER_PID
116116
117- # Test vLLM metrics reporting with parameter "REPORT_METRICS" set to "no " in config.pbtxt
117+ # Test vLLM metrics reporting with parameter "REPORT_METRICS" set to "yes " in config.pbtxt
118118cp ${SAMPLE_MODELS_REPO} /vllm_model/config.pbtxt models/vllm_opt
119119echo -e "
120120parameters: {
@@ -149,6 +149,35 @@ else
149149fi
150150set -e
151151
152+ kill $SERVER_PID
153+ wait $SERVER_PID
154+
155+ # Test enabling vLLM metrics reporting in config.pbtxt while disabling in server option
156+ SERVER_ARGS=" ${SERVER_ARGS} --allow-metrics=false"
157+ run_server
158+ if [ " $SERVER_PID " == " 0" ]; then
159+ cat $SERVER_LOG
160+ echo -e " \n***\n*** Failed to start $SERVER \n***"
161+ exit 1
162+ fi
163+
164+ set +e
165+ python3 $CLIENT_PY VLLMTritonMetricsTest.test_vllm_metrics_refused -v > $CLIENT_LOG 2>&1
166+
167+ if [ $? -ne 0 ]; then
168+ cat $CLIENT_LOG
169+ echo -e " \n***\n*** Running $CLIENT_PY VLLMTritonMetricsTest.test_vllm_metrics_refused FAILED. \n***"
170+ RET=1
171+ else
172+ check_test_results $TEST_RESULT_FILE $EXPECTED_NUM_TESTS
173+ if [ $? -ne 0 ]; then
174+ cat $CLIENT_LOG
175+ echo -e " \n***\n*** Test Result Verification FAILED.\n***"
176+ RET=1
177+ fi
178+ fi
179+ set -e
180+
152181kill $SERVER_PID
153182wait $SERVER_PID
154183rm -rf " ./models" " temp.json"
Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ def test_vllm_metrics_disabled(self):
137137 # No vLLM metric found
138138 self .assertEqual (len (metrics_dict ), 0 )
139139
140+ def test_vllm_metrics_refused (self ):
141+ # Test vLLM metrics
142+ self .vllm_infer (
143+ prompts = self .prompts ,
144+ sampling_parameters = self .sampling_parameters ,
145+ model_name = self .vllm_model_name ,
146+ )
147+ with self .assertRaises (requests .exceptions .ConnectionError ):
148+ self .get_vllm_metrics ()
149+
140150 def tearDown (self ):
141151 self .triton_client .close ()
142152
You can’t perform that action at this time.
0 commit comments