Skip to content

Commit e97ad74

Browse files
tanmayv25Tabrizianrmccorm4kthui
authored
Adding client-side request cancellation support and testing (#6383)
* Add L0_request_cancellation (#6252) * Add L0_request_cancellation * Remove unittest test * Add cancellation to gRPC server error handling * Fix up * Use identity model * Add tests for gRPC client-side cancellation (#6278) * Add tests for gRPC client-side cancellation * Fix CodeQL issues * Formatting * Update qa/L0_client_cancellation/client_cancellation_test.py Co-authored-by: Ryan McCormick <[email protected]> * Move to L0_request_cancellation * Address review comments * Removing request cancellation support from asyncio version * Format * Update copyright * Remove tests * Handle cancellation notification in gRPC server (#6298) * Handle cancellation notification in gRPC server * Fix the request ptr initialization * Update src/grpc/infer_handler.h Co-authored-by: Ryan McCormick <[email protected]> * Address review comment * Fix logs * Fix request complete callback by removing reference to state * Improve documentation --------- Co-authored-by: Ryan McCormick <[email protected]> --------- Co-authored-by: Ryan McCormick <[email protected]> * Fixes on the gRPC frontend to handle AsyncNotifyWhenDone() API (#6345) * Fix segmentation fault in gRPC frontend * Finalize all states upon completion * Fixes all state cleanups * Handle completed states when cancellation notification is received * Add more documentation steps * Retrieve dormant states to minimize the memory footprint for long streams * Update src/grpc/grpc_utils.h Co-authored-by: Ryan McCormick <[email protected]> * Use a boolean state instead of raw pointer --------- Co-authored-by: Ryan McCormick <[email protected]> * Add L0_grpc_state_cleanup test (#6353) * Add L0_grpc_state_cleanup test * Add model file in QA container * Fix spelling * Add remaining subtests * Add failing subtests * Format fixes * Fix model repo * Fix QA docker file * Remove checks for the error message when shutting down server * Fix spelling * Address review comments * Add schedulers request cancellation tests (#6309) * Add schedulers request cancellation tests * Merge gRPC client test * Reduce testing time and covers cancelling other requests as a consequence of request cancellation * Add streaming request cancellation test --------- Co-authored-by: Iman Tabrizian <[email protected]> Co-authored-by: Ryan McCormick <[email protected]> Co-authored-by: Jacky <[email protected]>
1 parent 4b4f569 commit e97ad74

File tree

11 files changed

+1938
-78
lines changed

11 files changed

+1938
-78
lines changed

Dockerfile.QA

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ RUN mkdir -p qa/common && \
109109
cp -r docs/examples/model_repository/simple_sequence qa/L0_grpc/models && \
110110
cp -r docs/examples/model_repository/simple_string qa/L0_grpc/models && \
111111
cp -r docs/examples/model_repository/inception_graphdef qa/L0_grpc/models && \
112+
mkdir qa/L0_grpc_state_cleanup/models && \
113+
cp -r /workspace/src/test/models/repeat_int32 qa/L0_grpc_state_cleanup/models/ && \
112114
mkdir qa/L0_http/models && \
113115
cp -r docs/examples/model_repository/simple qa/L0_http/models && \
114116
cp -r docs/examples/model_repository/simple_dyna_sequence qa/L0_http/models && \
@@ -139,6 +141,7 @@ RUN mkdir -p qa/common && \
139141
cp bin/data_compressor_test qa/L0_data_compression/. && \
140142
cp bin/metrics_api_test qa/L0_metrics/. && \
141143
cp bin/response_cache_test qa/L0_response_cache/. && \
144+
cp bin/request_cancellation_test qa/L0_request_cancellation/. && \
142145
cp bin/triton_json_test qa/L0_json/. && \
143146
cp bin/backend_output_detail_test qa/L0_backend_output_detail/. && \
144147
cp -r deploy/mlflow-triton-plugin qa/L0_mlflow/.
@@ -259,6 +262,10 @@ RUN cp -r qa/L0_decoupled/models qa/L0_decoupled/python_models/ && \
259262
cp /workspace/tritonbuild/python/examples/decoupled/square_config.pbtxt \
260263
qa/L0_decoupled/python_models/square_int32/.
261264

265+
RUN mkdir -p qa/L0_grpc_state_cleanup/models/repeat_int32/1 && \
266+
cp backends/repeat/libtriton_repeat.so \
267+
qa/L0_grpc_state_cleanup/models/repeat_int32/1/.
268+
262269
RUN mkdir -p qa/L0_repoagent_checksum/models/identity_int32/1 && \
263270
cp tritonbuild/identity/install/backends/identity/libtriton_identity.so \
264271
qa/L0_repoagent_checksum/models/identity_int32/1/.

0 commit comments

Comments
 (0)