Skip to content

Commit d4cd45f

Browse files
committed
cleanup readability
1 parent cdd5efc commit d4cd45f

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

qa/L0_sagemaker/test.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,12 @@ wait $SERVE_PID
618618
# unrestricted.
619619

620620
SERVER_LOG="./sagemaker_restricted_api_server.log"
621-
SERVER_ARGS="--allow-sagemaker=true --allow-http=true --allow-grpc=false --allow-metrics=false \
622-
--model-repository=`pwd`/models --model-control-mode=explicit \
623-
--load-model=sm_model \
624-
--http-restricted-api=model-repository:X-SM-Auth=secret"
621+
SERVER_ARGS="--allow-sagemaker=true --allow-http=true \
622+
--allow-grpc=false --allow-metrics=false \
623+
--model-repository=`pwd`/models \
624+
--model-control-mode=explicit \
625+
--load-model=sm_model \
626+
--http-restricted-api=model-repository:X-SM-Auth=secret"
625627
run_server_nowait
626628
sagemaker_wait_for_server_ready $SERVER_PID 10
627629
if [ "$WAIT_RET" != "0" ]; then
@@ -744,10 +746,12 @@ wait $SERVER_PID
744746
# path, not just the core HTTP endpoint.
745747

746748
SERVER_LOG="./sagemaker_max_input_size_server.log"
747-
SERVER_ARGS="--allow-sagemaker=true --allow-http=true --allow-grpc=false --allow-metrics=false \
748-
--model-repository=`pwd`/models --model-control-mode=explicit \
749-
--load-model=sm_model \
750-
--http-max-input-size=256"
749+
SERVER_ARGS="--allow-sagemaker=true --allow-http=true \
750+
--allow-grpc=false --allow-metrics=false \
751+
--model-repository=`pwd`/models \
752+
--model-control-mode=explicit \
753+
--load-model=sm_model \
754+
--http-max-input-size=256"
751755
run_server_nowait
752756
sagemaker_wait_for_server_ready $SERVER_PID 10
753757
if [ "$WAIT_RET" != "0" ]; then

src/main.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ StartSagemakerService(
183183
size_t max_input_size = triton::server::HTTP_DEFAULT_MAX_INPUT_SIZE;
184184
triton::server::RestrictedFeatures restricted_apis{};
185185
#ifdef TRITON_ENABLE_HTTP
186+
// Reuse HTTP server settings for SageMaker endpoint behavior. In
187+
// particular, --http-restricted-api and --http-max-input-size also apply
188+
// to SageMaker requests. Without TRITON_ENABLE_HTTP, SageMaker falls back to
189+
// default input size and unrestricted APIs (no command-line configuration for
190+
// restricted APIs).
186191
max_input_size = g_triton_params.http_max_input_size_;
187192
restricted_apis = g_triton_params.http_restricted_apis_;
188193
#endif // TRITON_ENABLE_HTTP

0 commit comments

Comments
 (0)