From bc2c0d70325458ce5036c06d986e631e378c2434 Mon Sep 17 00:00:00 2001 From: Matthew Wittwer Date: Wed, 4 Feb 2026 23:59:21 +0000 Subject: [PATCH 1/2] Add test case for output tensor size --- qa/L0_parameters/class_count_test.py | 13 +++++++++++++ qa/L0_parameters/test.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/qa/L0_parameters/class_count_test.py b/qa/L0_parameters/class_count_test.py index 9e49ae4ae2..2651a8c7be 100755 --- a/qa/L0_parameters/class_count_test.py +++ b/qa/L0_parameters/class_count_test.py @@ -100,6 +100,19 @@ def test_classificattion_unsupported_data_type(self): str(e.exception), ) + def test_classification_output_tensor_too_large(self): + max_elements = 1_000_000 + shape = (1, max_elements + 1) + dtype = "FP32" + model_name = "identity_fp32" + input_data = np.ones(shape, dtype=np.float32) + + inputs, outputs = self._prepare_io(input_data, dtype) + with self.assertRaises(InferenceServerException) as e: + self.client.infer(model_name=model_name, inputs=inputs, outputs=outputs) + + self.assertIn("classification output tensor too large", str(e.exception)) + if __name__ == "__main__": unittest.main() diff --git a/qa/L0_parameters/test.sh b/qa/L0_parameters/test.sh index 63868237aa..c5bf863551 100755 --- a/qa/L0_parameters/test.sh +++ b/qa/L0_parameters/test.sh @@ -136,7 +136,7 @@ for client_type in http grpc; do echo -e "\n***\n*** Test Failed - class_count_${client_type}_test_client\n***" RET=1 else - check_test_results $TEST_RESULT_FILE 2 + check_test_results $TEST_RESULT_FILE 3 if [ $? -ne 0 ]; then cat $TEST_RESULT_FILE echo -e "\n***\n*** Test Result Verification Failed - class_count_${client_type}_test_client\n***" From 8ea76369b1fb25c632f5b7dd14c068fe330ea568 Mon Sep 17 00:00:00 2001 From: Matthew Wittwer Date: Thu, 5 Feb 2026 00:22:09 +0000 Subject: [PATCH 2/2] fix pre-commit --- qa/L0_parameters/class_count_test.py | 2 +- qa/L0_parameters/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/L0_parameters/class_count_test.py b/qa/L0_parameters/class_count_test.py index 2651a8c7be..801c442b87 100755 --- a/qa/L0_parameters/class_count_test.py +++ b/qa/L0_parameters/class_count_test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/qa/L0_parameters/test.sh b/qa/L0_parameters/test.sh index c5bf863551..b4d1599754 100755 --- a/qa/L0_parameters/test.sh +++ b/qa/L0_parameters/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023-2025, NVIDIA CORPORATION. All rights reserved. +# Copyright 2023-2026, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions