Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
failed to load 'allocation_strategy_invalid_value' version 1: Invalid argument: Invalid value for 'execution_context_allocation_strategy': 'UNKNOWN' for model instance 'allocation_strategy_invalid_value'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
parameters: {
key: "execution_context_allocation_strategy"
value: {
string_value: "UNKNOWN"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
parameters: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'execution_context_allocation_strategy' set to 'STATIC' for model instance 'allocation_strategy_value_1'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
parameters: {
key: "execution_context_allocation_strategy"
value: {
string_value: "STATIC"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'execution_context_allocation_strategy' set to 'ON_PROFILE_CHANGE' for model instance 'allocation_strategy_value_2'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
parameters: {
key: "execution_context_allocation_strategy"
value: {
string_value: "ON_PROFILE_CHANGE"
}
}
90 changes: 89 additions & 1 deletion qa/L0_model_config/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,26 @@ cp -r /data/inferenceserver/${REPO_VERSION}/qa_model_repository/openvino_int8_in
cp /data/inferenceserver/${REPO_VERSION}/qa_model_repository/openvino_int8_int8_int8/output0_labels.txt \
autofill_noplatform_success/openvino/partial_config

# Copy decoupled model into the model_metrics test repository.
# Copy decoupled model and config files into the model_metrics test repository.
for modelpath in `ls -d model_metrics/*/*`; do
src_dir="/opt/tritonserver/qa/python_models/async_execute_decouple"
mkdir -p $modelpath/1
cp $src_dir/model.py $modelpath/1/.
cat $src_dir/config.pbtxt $modelpath/partial.pbtxt > $modelpath/config.pbtxt
done

# Copy tensorrt model and config files into the custom_parameters test repository.
for modelpath in `ls -d custom_parameters/tensorrt/*/*`; do
mkdir -p $modelpath/1
model_name=`basename $modelpath`
src_dir="/data/inferenceserver/${REPO_VERSION}/qa_model_repository/plan_float32_float32_float32"
cp ${src_dir}/1/model.plan $modelpath/1/.
cat ${src_dir}/config.pbtxt $modelpath/partial.pbtxt > $modelpath/config.pbtxt
sed -i "s/^name:.*/name: \"${model_name}\"/" $modelpath/config.pbtxt
sed -i "s/^version_policy:.*//" $modelpath/config.pbtxt
sed -i "s/label_filename:.*//" $modelpath/config.pbtxt
done

rm -f $SERVER_LOG_BASE* $CLIENT_LOG
RET=0

Expand Down Expand Up @@ -694,6 +706,82 @@ for TARGET_DIR in `ls -d model_metrics/invalid_config/*`; do
fi
done

# Run all custom_parameters tests that are expected to succeed.
for TARGET_DIR in `ls -d custom_parameters/*/valid/*`; do
TARGET_DIR_DOT=`echo $TARGET_DIR | tr / .`
TARGET=`basename ${TARGET_DIR}`

SERVER_ARGS="--model-repository=`pwd`/models --log-info=true"
SERVER_LOG=$SERVER_LOG_BASE.${TARGET_DIR_DOT}.log

rm -fr models && mkdir models
cp -r ${TARGET_DIR} models/.

EXPECTED=models/$TARGET/expected
echo -e "Test $TARGET_DIR" >> $CLIENT_LOG

run_server
if [ "$SERVER_PID" == "0" ]; then
echo -e "*** FAILED: unable to start $SERVER" >> $CLIENT_LOG
RET=1
else
kill $SERVER_PID
wait $SERVER_PID
fi

if [ -f $EXPECTED ]; then
EX_FOUND=0
EX=`cat $EXPECTED`
if grep ^I[0-9][0-9][0-9][0-9].*"$EX" $SERVER_LOG; then
echo -e "Found \"$EX\"" >> $CLIENT_LOG
EX_FOUND=1
else
echo -e "Not found \"$EX\"" >> $CLIENT_LOG
fi
if [ "$EX_FOUND" == "0" ]; then
echo -e "*** FAILED: model_metrics/$TARGET" >> $CLIENT_LOG
RET=1
fi
fi
done

# Run all custom_parameters tests that have invalid values.
for TARGET_DIR in `ls -d custom_parameters/*/invalid/*`; do
TARGET_DIR_DOT=`echo $TARGET_DIR | tr / .`
TARGET=`basename ${TARGET_DIR}`

SERVER_ARGS="--model-repository=`pwd`/models --log-info=true"
SERVER_LOG=$SERVER_LOG_BASE.${TARGET_DIR_DOT}.log

rm -fr models && mkdir models
cp -r ${TARGET_DIR} models/.

EXPECTED=models/$TARGET/expected
echo -e "Test $TARGET_DIR" >> $CLIENT_LOG

# We expect all tests to fail with the expected error message
run_server
if [ "$SERVER_PID" != "0" ]; then
echo -e "*** FAILED: unexpected success starting $SERVER" >> $CLIENT_LOG
RET=1
kill $SERVER_PID
wait $SERVER_PID
else
EX_FOUND=0
EX=`cat $EXPECTED`
if grep ^E[0-9][0-9][0-9][0-9].*"$EX" $SERVER_LOG; then
echo -e "Found \"$EX\"" >> $CLIENT_LOG
EX_FOUND=1
else
echo -e "Not found \"$EX\"" >> $CLIENT_LOG
fi
if [ "$EX_FOUND" == "0" ]; then
echo -e "*** FAILED: model_metrics/$TARGET" >> $CLIENT_LOG
RET=1
fi
fi
done

if [ $RET -eq 0 ]; then
echo -e "\n***\n*** Test Passed\n***"
else
Expand Down
1 change: 1 addition & 0 deletions qa/common/check_copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"qa/L0_model_config/cli_messages/cli_override/expected",
"qa/L0_model_config/cli_messages/cli_deprecation/expected",
"qa/L0_model_config/model_metrics",
"qa/L0_model_config/custom_parameters",
"qa/L0_model_namespacing/test_duplication",
"qa/L0_model_namespacing/test_dynamic_resolution",
"qa/L0_model_namespacing/test_ensemble_duplication",
Expand Down