1
1
#!/usr/bin/env python3
2
2
3
- # Copyright 2018-2024 , NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ # Copyright 2018-2025 , NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4
4
#
5
5
# Redistribution and use in source and binary forms, with or without
6
6
# modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@ class ServerMetadataTest(tu.TestResultCollector):
45
45
def test_basic (self ):
46
46
try :
47
47
for pair in [("localhost:8000" , "http" ), ("localhost:8001" , "grpc" )]:
48
- model_name = "graphdef_int32_int8_int8 "
48
+ model_name = "libtorch_int32_int8_int8 "
49
49
extensions = [
50
50
"classification" ,
51
51
"sequence" ,
@@ -129,7 +129,7 @@ def test_unknown_model(self):
129
129
def test_unknown_model_version (self ):
130
130
try :
131
131
for pair in [("localhost:8000" , "http" ), ("localhost:8001" , "grpc" )]:
132
- model_name = "graphdef_int32_int8_int8 "
132
+ model_name = "onnx_int32_int8_int8 "
133
133
if pair [1 ] == "http" :
134
134
triton_client = httpclient .InferenceServerClient (
135
135
url = pair [0 ], verbose = True
@@ -149,18 +149,18 @@ def test_unknown_model_version(self):
149
149
except InferenceServerException as ex :
150
150
self .assertTrue (
151
151
ex .message ().startswith (
152
- "Request for unknown model: 'graphdef_int32_int8_int8 ' version 99 is not found"
152
+ "Request for unknown model: 'onnx_int32_int8_int8 ' version 99 is not found"
153
153
)
154
154
)
155
155
156
156
def test_model_latest_infer (self ):
157
157
input_size = 16
158
158
tensor_shape = (1 , input_size )
159
- platform_name = {"graphdef " : "tensorflow_graphdef " , "onnx" : "onnxruntime_onnx" }
159
+ platform_name = {"plan " : "tensorrt_plan " , "onnx" : "onnxruntime_onnx" }
160
160
161
161
# There are 3 versions of *_int32_int32_int32 and all
162
162
# should be available.
163
- for platform in ("graphdef " , "onnx" ):
163
+ for platform in ("plan " , "onnx" ):
164
164
model_name = platform + "_int32_int32_int32"
165
165
166
166
# Initially there should be no version stats..
@@ -316,7 +316,7 @@ def test_model_specific_infer(self):
316
316
317
317
# There are 3 versions of *_float32_float32_float32 but only
318
318
# versions 1 and 3 should be available.
319
- for platform in ("graphdef " , "onnx" , "plan" ):
319
+ for platform in ("libtorch " , "onnx" , "plan" ):
320
320
tensor_shape = (1 , input_size )
321
321
model_name = platform + "_float32_float32_float32"
322
322
@@ -439,7 +439,7 @@ def test_model_versions_deleted(self):
439
439
# version 3 was executed once. Version 2 and 3 models were
440
440
# deleted from the model repository so now only expect version 1 to
441
441
# be ready and show stats.
442
- for platform in ("graphdef " , "onnx" ):
442
+ for platform in ("libtorch " , "onnx" ):
443
443
model_name = platform + "_int32_int32_int32"
444
444
445
445
try :
@@ -513,7 +513,7 @@ def test_model_versions_added(self):
513
513
# Originally There was version 1 of *_float16_float32_float32.
514
514
# Version 7 was added so now expect just version 7 to be ready
515
515
# and provide infer stats.
516
- for platform in ("graphdef " ,):
516
+ for platform in ("plan " ,):
517
517
model_name = platform + "_float16_float32_float32"
518
518
519
519
try :
@@ -615,7 +615,7 @@ def test_infer_stats_no_model_version(self):
615
615
# version 3 was executed once. Version 2 and 3 models were
616
616
# deleted from the model repository so now only expect version 1 to
617
617
# be ready and show infer stats.
618
- for platform in ("graphdef " , "onnx" ):
618
+ for platform in ("libtorch " , "onnx" ):
619
619
model_name = platform + "_int32_int32_int32"
620
620
621
621
try :
@@ -723,8 +723,8 @@ def test_infer_stats_no_model(self):
723
723
stats = infer_stats .model_stats
724
724
self .assertEqual (
725
725
len (stats ),
726
- 221 ,
727
- "expected 221 infer stats for all ready versions of all model" ,
726
+ 125 ,
727
+ "expected 125 infer stats for all ready versions of all model" ,
728
728
)
729
729
730
730
except InferenceServerException as ex :
0 commit comments