From 2847211c99b7ee4bfb8a51d9de420a49f62eede9 Mon Sep 17 00:00:00 2001 From: dyastremsky <58150256+dyastremsky@users.noreply.github.com> Date: Thu, 20 Jul 2023 13:14:22 -0700 Subject: [PATCH] Add GitHub action to format and lint code (#6022) * Add pre-commit * Fix typos, exec/shebang, formatting * Remove clang-format * Update contributing md to include pre-commit * Update spacing in CONTRIBUTING * Fix contributing pre-commit link * Link to pre-commit install directions * Wording * Restore clang-format * Fix yaml spacing * Exclude templates folder for check-yaml * Remove unused vars * Normalize spacing * Remove unused variable * Normalize config indentation * Update .clang-format to enforce max line length of 80 * Update copyrights * Update copyrights * Run workflows on every PR * Fix copyright year * Fix grammar * Entrypoint.d files are not executable * Run pre-commit hooks * Mark not executable * Run pre-commit hooks * Remove unused variable * Run pre-commit hooks after rebase * Update copyrights * Fix README.md typo (decoupled) Co-authored-by: Ryan McCormick * Run pre-commit hooks * Grammar fix Co-authored-by: Ryan McCormick * Redundant word Co-authored-by: Ryan McCormick * Revert docker file changes * Executable shebang revert * Make model.py files non-executable * Passin is proper flag * Run pre-commit hooks on init_args/model.py * Fix typo in init_args/model.py * Make copyrights one line --------- Co-authored-by: Ryan McCormick --- .clang-format | 4 +- .github/workflows/codeql.yml | 12 +- .github/workflows/pre-commit.yaml | 39 + .pre-commit-config.yaml | 74 + CMakeLists.txt | 2 +- CONTRIBUTING.md | 30 +- Dockerfile.QA | 2 +- Dockerfile.sdk | 6 +- Dockerfile.win10.min | 4 +- README.md | 92 +- build.py | 2078 +++++++------ compose.py | 417 +-- deploy/alibaba-cloud/README.md | 10 +- deploy/aws/README.md | 8 +- deploy/aws/templates/deployment.yaml | 6 +- deploy/fleetcommand/README.md | 6 +- deploy/gcp/README.md | 4 +- deploy/gke-marketplace-app/README.md | 28 +- .../gke-marketplace-app/benchmark/README.md | 17 +- .../model-store/bert_base_tf_gpu/config.pbtxt | 4 +- .../bert_base_trt_gpu/config.pbtxt | 4 +- .../bert_distill_tf_cpu/config.pbtxt | 4 +- .../bert_distill_tf_gpu/config.pbtxt | 4 +- .../perf-analyzer-script/perf_query.sh | 0 .../client-sample/bert_request.json | 6 +- .../client-sample/locustfile_bert.py | 17 +- .../client-sample/perf_analyzer_grpc.sh | 0 .../server-deployer/build_and_push.sh | 3 +- .../chart/triton/templates/application.yaml | 10 +- .../chart/triton/templates/deployment.yaml | 4 +- .../chart/triton/templates/service.yaml | 6 +- .../server-deployer/chart/triton/values.yaml | 2 +- .../server-deployer/data-test/schema.yaml | 20 +- .../server-deployer/schema.yaml | 20 +- .../gke-marketplace-app/trt-engine/README.md | 12 +- .../onnx_float32_int32_int32/config.pbtxt | 0 .../mlflow_triton/__init__.py | 6 +- .../mlflow_triton/config.py | 55 +- .../mlflow_triton/deployments.py | 299 +- .../scripts/publish_model_to_mlflow.py | 22 +- .../scripts/triton_flavor.py | 16 +- deploy/mlflow-triton-plugin/setup.py | 6 +- docker/cpu_only/entrypoint.d/12-banner.sh | 0 .../entrypoint.d/50-gpu-driver-check2.sh | 0 docker/entrypoint.d/50-gpu-driver-check2.sh | 0 docker/entrypoint.d/99-check-run-aip-mode.sh | 0 docker/sagemaker/serve | 10 +- docs/Makefile | 4 +- docs/README.md | 30 +- docs/_static/custom.css | 6 +- docs/conf.py | 66 +- docs/customization_guide/build.md | 12 +- .../inference_protocols.md | 26 +- docs/examples/README.md | 4 +- .../concurrency_and_dynamic_batching/Makefile | 6 +- .../README.md | 24 +- .../tao/convert_peoplenet.sh | 0 .../simple_identity/config.pbtxt | 0 docs/getting_started/quickstart.md | 10 +- docs/index.md | 8 +- docs/protocol/extension_logging.md | 24 +- .../protocol/extension_model_configuration.md | 4 +- docs/protocol/extension_parameters.md | 4 +- docs/protocol/extension_schedule_policy.md | 2 +- docs/protocol/extension_sequence.md | 6 +- docs/protocol/extension_statistics.md | 12 +- docs/protocol/extension_trace.md | 2 +- docs/user_guide/architecture.md | 12 +- docs/user_guide/custom_operations.md | 4 +- docs/user_guide/decoupled_models.md | 8 +- docs/user_guide/faq.md | 4 +- docs/user_guide/jetson.md | 4 +- docs/user_guide/metrics.md | 30 +- docs/user_guide/model_analyzer.md | 2 +- docs/user_guide/model_configuration.md | 68 +- docs/user_guide/model_management.md | 10 +- docs/user_guide/model_repository.md | 18 +- docs/user_guide/optimization.md | 10 +- docs/user_guide/performance_tuning.md | 8 +- docs/user_guide/rate_limiter.md | 4 +- docs/user_guide/response_cache.md | 68 +- docs/user_guide/trace.md | 86 +- pyproject.toml | 51 + qa/L0_async_work_queue/test.sh | 0 qa/L0_backend_config/test.sh | 50 +- qa/L0_backend_fastertransformer/test.sh | 2 +- qa/L0_backend_identity/identity_test.py | 192 +- .../models/argument_validation/1/model.py | 72 +- .../argument_validation/test.sh | 1 + qa/L0_backend_python/bls/test.sh | 8 +- qa/L0_backend_python/common.sh | 5 +- qa/L0_backend_python/custom_metrics/test.sh | 2 +- .../decoupled/decoupled_test.py | 108 +- .../decoupled/models/decoupled_bls/1/model.py | 125 +- .../models/decoupled_bls_stream/1/model.py | 70 +- .../models/decoupled_execute_error/1/model.py | 52 +- .../1/model.py | 46 +- .../1/model.py | 45 +- qa/L0_backend_python/decoupled/test.sh | 1 + .../ensemble/ensemble_test.py | 46 +- qa/L0_backend_python/ensemble/test.sh | 0 qa/L0_backend_python/env/test.sh | 4 +- qa/L0_backend_python/examples/test.sh | 2 +- qa/L0_backend_python/io/io_test.py | 74 +- qa/L0_backend_python/io/test.sh | 0 .../lifecycle/lifecycle_test.py | 59 +- qa/L0_backend_python/lifecycle/test.sh | 2 +- qa/L0_backend_python/logging/logging_test.py | 20 +- qa/L0_backend_python/logging/test.sh | 4 +- .../model_control/model_control_test.py | 23 +- qa/L0_backend_python/model_control/test.sh | 0 qa/L0_backend_python/python_test.py | 297 +- qa/L0_backend_python/python_unittest.py | 26 +- .../restart/models/restart/1/model.py | 21 +- qa/L0_backend_python/restart/restart_test.py | 23 +- qa/L0_backend_python/restart/test.sh | 0 qa/L0_backend_python/variants/test.sh | 2 +- qa/L0_batch_custom/batch_custom_test.py | 200 +- qa/L0_batch_custom/test.sh | 4 +- qa/L0_batch_input/batch_input_test.py | 170 +- qa/L0_batch_input/test.sh | 0 qa/L0_batcher/batcher_test.py | 1348 +++++---- qa/L0_batcher/test.sh | 2 +- qa/L0_batcher/verify_timestamps.py | 45 +- .../buffer_attributes_test.py | 65 +- qa/L0_buffer_attributes/models/bls/1/model.py | 21 +- .../models/identity/1/model.py | 8 +- qa/L0_buffer_attributes/test.sh | 3 +- qa/L0_client_build_variants/test.sh | 2 +- qa/L0_client_java/test.sh | 0 .../client_memory_mail.py | 12 +- .../models/custom_identity_int32/config.pbtxt | 2 +- qa/L0_client_memory_growth/test.sh | 2 +- qa/L0_client_nobatch/client_test.py | 200 +- qa/L0_client_timeout/client_timeout_test.py | 157 +- .../models/custom_identity_int32/config.pbtxt | 2 +- qa/L0_client_timeout/test.sh | 0 .../models/custom_identity_int32/config.pbtxt | 2 +- qa/L0_cmdline_trace/test.sh | 2 +- qa/L0_cmdline_trace/trace_client.py | 37 +- qa/L0_cuda_graph/test.sh | 0 qa/L0_cuda_graph/trt_cuda_graph_test.py | 72 +- .../cuda_shared_memory_test.py | 137 +- qa/L0_cuda_shared_memory/test.sh | 0 qa/L0_custom_ops/cuda_op_test.py | 66 +- qa/L0_custom_ops/mod_op_test.py | 77 +- qa/L0_custom_ops/onnx_op_test.py | 74 +- qa/L0_custom_ops/vision_op_test.py | 74 +- qa/L0_custom_ops/zero_out_test.py | 64 +- qa/L0_data_compression/test.sh | 0 qa/L0_data_compression/validation.py | 12 +- qa/L0_decoupled/decoupled_test.py | 400 +-- qa/L0_decoupled/test.sh | 16 +- qa/L0_device_memory_tracker/test.py | 32 +- qa/L0_device_memory_tracker/test.sh | 0 qa/L0_dlpack_multi_gpu/test.sh | 2 +- qa/L0_doc_links/test.sh | 3 +- qa/L0_dyna_implicit_state/test.sh | 0 .../dyna_sequence_batcher_test.py | 1016 ++++--- qa/L0_dyna_sequence_batcher/test.sh | 2 +- .../client_plugin_test/1/model.py | 23 +- qa/L0_grpc/grpc_basic_auth_test.py | 19 +- qa/L0_grpc/grpc_client_plugin_test.py | 36 +- qa/L0_grpc/python_grpc_aio_test.py | 23 +- qa/L0_grpc/python_unit_test.py | 93 +- qa/L0_grpc/test.sh | 2 +- qa/L0_http/http_basic_auth_test.py | 19 +- qa/L0_http/http_client_plugin_test.py | 64 +- qa/L0_http/http_test.py | 124 +- qa/L0_http/python_http_aio_test.py | 14 +- qa/L0_http/test.sh | 4 +- qa/L0_http_fuzz/fuzztest.py | 55 +- qa/L0_http_fuzz/test.sh | 6 +- qa/L0_https/test.sh | 4 +- qa/L0_implicit_state/implicit_state.py | 154 +- qa/L0_implicit_state/test.sh | 0 qa/L0_infer/infer_test.py | 1184 ++++---- qa/L0_infer/install_and_test.sh | 2 +- qa/L0_infer_reshape/infer_reshape_test.py | 252 +- qa/L0_infer_variable/infer_variable_test.py | 452 +-- qa/L0_infer_zero/infer_zero_test.py | 332 ++- qa/L0_inferentia_perf_analyzer/test.sh | 34 +- qa/L0_io/test.sh | 2 +- .../MemoryGrowthTest.java | 1570 +++++----- qa/L0_java_memory_growth/test.sh | 2 +- qa/L0_java_resnet/ResnetTest.java | 1039 +++---- qa/L0_java_sequence_batcher/SequenceTest.java | 1083 +++---- qa/L0_json/test.sh | 0 qa/L0_large_payload/large_payload_test.py | 102 +- qa/L0_large_payload/test.sh | 0 qa/L0_libtorch_inference_mode/test.sh | 0 .../client.py | 26 +- .../gen_models.py | 18 +- .../models/libtorch_multi_device/config.pbtxt | 0 .../test.sh | 8 +- qa/L0_libtorch_io_names/io_names_client.py | 46 +- qa/L0_libtorch_io_names/test.sh | 0 qa/L0_libtorch_nvfuser/test.sh | 0 qa/L0_libtorch_optimized_execution/test.sh | 0 .../libtorch_shared_weights_test.py | 21 +- qa/L0_libtorch_shared_weights/test.sh | 3 +- qa/L0_lifecycle/lifecycle_test.py | 2459 ++++++++------- qa/L0_lifecycle/test.sh | 8 +- qa/L0_logging/logging_endpoint_test.py | 330 +- qa/L0_logging/test.sh | 14 +- qa/L0_long_running_stress/crashing_client.py | 60 +- qa/L0_long_running_stress/scenarios.py | 653 ++-- qa/L0_long_running_stress/stress.py | 508 ++-- qa/L0_long_running_stress/stress_mail.py | 28 +- qa/L0_memory/test.sh | 0 qa/L0_memory_growth/busy_op_test.py | 84 +- qa/L0_memory_growth/server_memory_mail.py | 22 +- qa/L0_metrics/metrics_test.py | 34 +- qa/L0_metrics/test.sh | 2 +- qa/L0_mlflow/plugin_test.py | 53 +- qa/L0_mlflow/test.sh | 10 +- .../conflicting_max_batch_size/model.py | 11 +- .../conflicting_scheduler_sequence/model.py | 11 +- .../python/input_missing_datatype/model.py | 11 +- .../python/input_missing_dims/model.py | 11 +- .../python/input_missing_name/model.py | 11 +- .../python/input_wrong_property/model.py | 17 +- .../python/no_return/model.py | 11 +- .../python/output_missing_datatype/model.py | 11 +- .../python/output_missing_dims/model.py | 11 +- .../python/output_missing_name/model.py | 11 +- .../python/output_wrong_property/model.py | 17 +- .../onnx/cpu_instance/config.pbtxt | 0 .../openvino/partial_config/config.pbtxt | 0 .../conflicting_scheduler_ensemble/model.py | 7 +- .../ensemble_first_step/model.py | 7 +- .../ensemble_second_step/model.py | 7 +- .../python/dynamic_batching/model.py | 11 +- .../python/dynamic_batching_no_op/model.py | 11 +- .../python/incomplete_input/model.py | 9 +- .../reshape_config_provided/config.pbtxt | 0 qa/L0_model_config/compare_status.py | 45 +- qa/L0_model_config/noautofill_test.py | 8 +- qa/L0_model_config/test.sh | 6 +- .../python_addsub/__init__.py | 109 +- .../python_subadd/__init__.py | 109 +- qa/L0_model_namespacing/test.py | 101 +- qa/L0_model_namespacing/test.sh | 0 .../addsub_repo/composing_model/1/model.py | 2 +- .../addsub_repo/simple_addsub/config.pbtxt | 12 +- .../subadd_repo/composing_model/1/model.py | 2 +- .../subadd_repo/simple_subadd/config.pbtxt | 12 +- .../addsub_repo/composing_model/1/model.py | 2 +- .../addsub_repo/simple_addsub/config.pbtxt | 12 +- .../subadd_repo/composing_model/1/model.py | 2 +- .../subadd_repo/simple_subadd/config.pbtxt | 12 +- .../addsub_repo/composing_addsub/1/model.py | 2 +- .../addsub_repo/simple_ensemble/config.pbtxt | 12 +- .../subadd_repo/composing_subadd/1/model.py | 2 +- .../subadd_repo/simple_ensemble/config.pbtxt | 12 +- .../addsub_repo/composing_addsub/1/model.py | 2 +- .../addsub_repo/simple_addsub/config.pbtxt | 12 +- .../subadd_repo/composing_subadd/1/model.py | 2 +- .../subadd_repo/simple_subadd/config.pbtxt | 12 +- qa/L0_model_queue/model_queue_test.py | 392 ++- qa/L0_model_update/instance_update_test.py | 166 +- qa/L0_multi_server/test.sh | 0 .../models/nan_inf_output/1/model.py | 12 +- qa/L0_nan_inf/nan_inf_test.py | 49 +- .../nullchar_string_client.py | 63 +- qa/L0_nullchar_string/test.sh | 0 .../ensemble_identity_2_float32/config.pbtxt | 0 .../models/identity_2_float32/config.pbtxt | 0 .../pipeline_identity_2_float32/config.pbtxt | 0 qa/L0_optional_input/optional_input_test.py | 227 +- qa/L0_output_name/output_name_test.py | 20 +- qa/L0_output_name/test.sh | 0 qa/L0_output_validation/lt_op_val_client.py | 17 +- qa/L0_output_validation/test.sh | 0 qa/L0_parallel_copy/parallel_copy_test.py | 80 +- .../model_repository/parameter/1/model.py | 41 +- qa/L0_parameters/parameters_test.py | 162 +- qa/L0_parameters/test.sh | 8 +- .../config.pbtxt | 0 .../passive_instance_test.py | 15 +- qa/L0_passive_instance/test.sh | 0 qa/L0_perf_analyzer/test.sh | 12 +- qa/L0_perf_analyzer_doc_links/test.sh | 9 +- qa/L0_perf_analyzer_ground_truth/test.sh | 4 +- qa/L0_perf_analyzer_report/test.sh | 2 +- qa/L0_perf_kaldi/create_data.sh | 2 +- qa/L0_perf_kaldi/test.sh | 0 qa/L0_perf_nomodel/run_test.sh | 2 +- qa/L0_perf_pyclients/simple_perf_client.py | 317 +- qa/L0_perf_resnet/run_test.sh | 2 +- qa/L0_query/query_e2e.py | 108 +- qa/L0_query/test.sh | 0 qa/L0_rate_limiter/rate_limiter_test.py | 143 +- qa/L0_rate_limiter/test.sh | 2 +- qa/L0_register/test.sh | 0 qa/L0_repoagent_checksum/identity_test.py | 68 +- qa/L0_response_cache/test.sh | 8 +- qa/L0_sagemaker/sagemaker_multi_model_test.py | 226 +- qa/L0_sagemaker/sagemaker_test.py | 329 +- .../saved_model_shape_test.py | 302 +- qa/L0_savedmodel_shape/test.sh | 0 qa/L0_secure_grpc/test.sh | 2 +- .../sequence_batcher_test.py | 2450 ++++++++------- qa/L0_sequence_batcher/test.sh | 6 +- .../sequence_corrid_batcher_test.py | 139 +- qa/L0_sequence_stress/sequence_stress.py | 428 +-- qa/L0_server_status/server_status_test.py | 534 ++-- qa/L0_shared_memory/shared_memory_test.py | 164 +- qa/L0_shared_memory/test.sh | 0 qa/L0_simple_ensemble/ensemble_test.py | 73 +- qa/L0_simple_nodejs_client/test.sh | 0 qa/L0_socket/test.sh | 2 +- qa/L0_storage_S3_local/mock_s3_service.py | 36 +- qa/L0_storage_azure/test.sh | 2 +- qa/L0_storage_swiftstack/infer_test.py | 270 +- qa/L0_string_io/string_client_test.py | 152 +- qa/L0_tf_gpu_io/tf_gpu_io_test.py | 64 +- qa/L0_tf_parameters/test.sh | 0 qa/L0_tf_parameters/tf_parameter_test.py | 44 +- qa/L0_tf_tag_sigdef/tf_tag_sigdef_test.py | 13 +- qa/L0_tf_unknown_rank/test.sh | 0 qa/L0_tf_unknown_rank/tf_unknown_rank_test.py | 27 +- .../tftrt_optimization_test.py | 36 +- qa/L0_trace/opentelemetry_unittest.py | 197 +- qa/L0_trace/test.sh | 26 +- qa/L0_trace/trace_endpoint_test.py | 423 ++- qa/L0_triton_repo_agent/test.sh | 0 .../trt_data_dependent_shape_test.py | 25 +- qa/L0_trt_dla/dla_test.py | 23 +- qa/L0_trt_dla/test.sh | 0 qa/L0_trt_dynamic_shape/test.sh | 2 +- .../trt_dynamic_shape_test.py | 76 +- .../trt_error_propagation_test.py | 28 +- qa/L0_trt_plugin/test.sh | 0 qa/L0_trt_plugin/trt_plugin_test.py | 56 +- .../trt_reformat_free_test.py | 194 +- qa/L0_trt_shape_tensors/test.sh | 2 +- .../trt_shape_tensor_test.py | 674 +++-- qa/L0_vertex_ai/test.sh | 4 +- qa/L0_vertex_ai/vertex_ai_test.py | 241 +- qa/L0_warmup/decoupled/1/model.py | 7 +- qa/L0_warmup/failing_infer/1/model.py | 9 +- qa/L0_warmup/test.sh | 0 qa/common/check_copyright.py | 192 +- qa/common/check_massif_log.py | 45 +- qa/common/check_valgrind_log.py | 42 +- qa/common/cuda_op_kernel.cu.cc.patch | 8 +- qa/common/gen_ensemble_model_utils.py | 626 ++-- qa/common/gen_qa_custom_ops | 6 +- qa/common/gen_qa_custom_ops_models.py | 239 +- .../gen_qa_dyna_sequence_implicit_models.py | 470 +-- qa/common/gen_qa_dyna_sequence_models.py | 825 ++--- qa/common/gen_qa_identity_models.py | 853 +++--- qa/common/gen_qa_implicit_models.py | 998 ++++--- qa/common/gen_qa_model_repository | 6 +- qa/common/gen_qa_models.py | 2646 +++++++++++------ qa/common/gen_qa_noshape_models.py | 438 +-- qa/common/gen_qa_ragged_models.py | 442 +-- qa/common/gen_qa_reshape_models.py | 1364 ++++++--- qa/common/gen_qa_sequence_models.py | 812 +++-- qa/common/gen_qa_tf_parameters.py | 47 +- qa/common/gen_qa_torchtrt_models.py | 32 +- qa/common/gen_qa_trt_data_dependent_shape.py | 65 +- qa/common/gen_qa_trt_format_models.py | 351 ++- qa/common/gen_qa_trt_plugin_models.py | 312 +- qa/common/gen_tag_sigdef.py | 233 +- qa/common/infer_test.py | 263 +- qa/common/infer_util.py | 860 +++--- .../non_aligned_validation_batched.json | 56 +- .../non_aligned_validation_no_batch.json | 56 +- .../simple_model.py | 101 +- .../validation_batched.json | 64 +- .../validation_no_batch.json | 64 +- .../wrong_validation_batched.json | 64 +- .../wrong_validation_no_batch.json | 64 +- qa/common/libtorch_infer_client.py | 40 +- qa/common/nightly_email_helper.py | 41 +- .../int_data.json | 4 +- .../int_data_diff_shape.json | 4 +- .../perf_analyzer_input_data_json/output.json | 2 +- .../string_data_with_shape.json | 8 +- .../wrong_output.json | 2 +- .../wrong_output_2.json | 2 +- qa/common/reporter.py | 120 +- qa/common/sequence_util.py | 824 ++--- qa/common/shm_util.py | 314 +- qa/common/test_util.py | 173 +- qa/common/trace_summary.py | 345 ++- qa/common/util.sh | 3 +- .../custom_zero_1_float32/config.pbtxt | 0 qa/python_models/add_sub/model.py | 50 +- qa/python_models/add_sub_gpu/config.pbtxt | 8 +- qa/python_models/auto_complete/model.py | 58 +- qa/python_models/auto_complete_error/model.py | 11 +- qa/python_models/bls/model.py | 362 +-- qa/python_models/bls_async/model.py | 102 +- qa/python_models/bls_finalize_error/model.py | 12 +- qa/python_models/bls_init_error/model.py | 12 +- qa/python_models/bls_memory/model.py | 50 +- qa/python_models/bls_memory_async/model.py | 30 +- .../bls_model_loading/config.pbtxt | 4 +- qa/python_models/bls_model_loading/model.py | 35 +- qa/python_models/bls_onnx_warmup/config.pbtxt | 2 +- qa/python_models/bls_onnx_warmup/model.py | 41 +- qa/python_models/bls_undefined/model.py | 3 +- .../cuda_memory_consumer/1/model.py | 18 +- qa/python_models/custom_metrics/config.pbtxt | 4 +- qa/python_models/custom_metrics/model.py | 86 +- qa/python_models/delayed_model/model.py | 6 +- qa/python_models/dlpack_add_sub/model.py | 101 +- qa/python_models/dlpack_empty_output/model.py | 8 +- qa/python_models/dlpack_identity/model.py | 8 +- qa/python_models/dlpack_io_identity/model.py | 53 +- .../dlpack_io_identity_decoupled/model.py | 42 +- qa/python_models/dlpack_square/model.py | 56 +- qa/python_models/dlpack_sub_add/model.py | 101 +- qa/python_models/dlpack_test/model.py | 173 +- qa/python_models/execute_error/model.py | 13 +- .../execute_return_error/model.py | 1 - qa/python_models/fini_error/model.py | 3 +- qa/python_models/ground_truth/model.py | 8 +- qa/python_models/identity_fp32/model.py | 3 +- .../identity_fp32_logging/model.py | 3 +- .../identity_fp32_timeout/model.py | 4 +- qa/python_models/init_args/model.py | 43 +- qa/python_models/init_error/model.py | 5 +- qa/python_models/init_exit/model.py | 3 +- qa/python_models/model_env/model.py | 9 +- qa/python_models/model_init_del/model.py | 9 +- qa/python_models/model_init_del/util.py | 4 +- qa/python_models/multi_file/file1.py | 6 +- qa/python_models/multi_file/file2.py | 6 +- qa/python_models/multi_file/model.py | 11 +- qa/python_models/non_contiguous/model.py | 11 +- qa/python_models/optional/model.py | 14 +- qa/python_models/python_version/model.py | 29 +- qa/python_models/pytorch_fp32_fp32/model.py | 6 +- .../response_sender_error/model.py | 36 +- qa/python_models/sequence_int32/config.pbtxt | 6 +- qa/python_models/sequence_int32/model.py | 61 +- qa/python_models/string/model.py | 6 +- qa/python_models/string_fixed/model.py | 14 +- qa/python_models/string_identity/model.py | 14 +- qa/python_models/sub_add/model.py | 54 +- .../torchvision/resnet50/config.pbtxt | 0 .../torchvision/resnet50/model.py | 22 +- qa/python_models/variable_gpu_output/model.py | 15 +- qa/python_models/wrong_model/model.py | 3 +- src/CMakeLists.txt | 8 +- src/command_line_parser.cc | 6 +- src/common.h | 23 +- src/data_compressor.h | 8 +- src/grpc/grpc_server.cc | 6 +- src/grpc/stream_infer_handler.cc | 2 +- src/http_server.cc | 6 +- src/sagemaker_server.h | 2 +- src/shared_memory_manager.cc | 4 +- src/simple.cc | 2 +- .../src/distributed_addsub.cc | 2 +- .../relocation_repoagent/src/relocation.cc | 2 +- src/vertex_ai_server.h | 2 +- 461 files changed, 26817 insertions(+), 20332 deletions(-) create mode 100644 .github/workflows/pre-commit.yaml create mode 100644 .pre-commit-config.yaml mode change 100644 => 100755 compose.py mode change 100644 => 100755 deploy/gke-marketplace-app/benchmark/perf-analyzer-script/perf_query.sh mode change 100644 => 100755 deploy/gke-marketplace-app/client-sample/locustfile_bert.py mode change 100644 => 100755 deploy/gke-marketplace-app/client-sample/perf_analyzer_grpc.sh mode change 100644 => 100755 deploy/gke-marketplace-app/server-deployer/build_and_push.sh mode change 100755 => 100644 deploy/mlflow-triton-plugin/examples/onnx_float32_int32_int32/config.pbtxt mode change 100644 => 100755 deploy/mlflow-triton-plugin/mlflow_triton/__init__.py mode change 100644 => 100755 deploy/mlflow-triton-plugin/mlflow_triton/config.py mode change 100644 => 100755 deploy/mlflow-triton-plugin/mlflow_triton/deployments.py mode change 100644 => 100755 deploy/mlflow-triton-plugin/scripts/publish_model_to_mlflow.py mode change 100644 => 100755 deploy/mlflow-triton-plugin/scripts/triton_flavor.py mode change 100644 => 100755 deploy/mlflow-triton-plugin/setup.py mode change 100644 => 100755 docker/cpu_only/entrypoint.d/12-banner.sh mode change 100644 => 100755 docker/cpu_only/entrypoint.d/50-gpu-driver-check2.sh mode change 100644 => 100755 docker/entrypoint.d/50-gpu-driver-check2.sh mode change 100644 => 100755 docker/entrypoint.d/99-check-run-aip-mode.sh mode change 100644 => 100755 docs/conf.py mode change 100644 => 100755 docs/examples/jetson/concurrency_and_dynamic_batching/tao/convert_peoplenet.sh mode change 100755 => 100644 docs/examples/model_repository/simple_identity/config.pbtxt create mode 100644 pyproject.toml mode change 100644 => 100755 qa/L0_async_work_queue/test.sh mode change 100644 => 100755 qa/L0_backend_config/test.sh mode change 100644 => 100755 qa/L0_backend_fastertransformer/test.sh mode change 100644 => 100755 qa/L0_backend_identity/identity_test.py mode change 100644 => 100755 qa/L0_backend_python/argument_validation/test.sh mode change 100644 => 100755 qa/L0_backend_python/bls/test.sh mode change 100644 => 100755 qa/L0_backend_python/common.sh mode change 100644 => 100755 qa/L0_backend_python/custom_metrics/test.sh mode change 100644 => 100755 qa/L0_backend_python/decoupled/decoupled_test.py mode change 100644 => 100755 qa/L0_backend_python/decoupled/test.sh mode change 100644 => 100755 qa/L0_backend_python/ensemble/ensemble_test.py mode change 100644 => 100755 qa/L0_backend_python/ensemble/test.sh mode change 100644 => 100755 qa/L0_backend_python/env/test.sh mode change 100644 => 100755 qa/L0_backend_python/examples/test.sh mode change 100644 => 100755 qa/L0_backend_python/io/io_test.py mode change 100644 => 100755 qa/L0_backend_python/io/test.sh mode change 100644 => 100755 qa/L0_backend_python/lifecycle/lifecycle_test.py mode change 100644 => 100755 qa/L0_backend_python/lifecycle/test.sh mode change 100644 => 100755 qa/L0_backend_python/logging/logging_test.py mode change 100644 => 100755 qa/L0_backend_python/model_control/model_control_test.py mode change 100644 => 100755 qa/L0_backend_python/model_control/test.sh mode change 100644 => 100755 qa/L0_backend_python/python_test.py mode change 100644 => 100755 qa/L0_backend_python/python_unittest.py mode change 100644 => 100755 qa/L0_backend_python/restart/restart_test.py mode change 100644 => 100755 qa/L0_backend_python/restart/test.sh mode change 100644 => 100755 qa/L0_backend_python/variants/test.sh mode change 100644 => 100755 qa/L0_batch_custom/batch_custom_test.py mode change 100644 => 100755 qa/L0_batch_input/batch_input_test.py mode change 100644 => 100755 qa/L0_batch_input/test.sh mode change 100644 => 100755 qa/L0_batcher/batcher_test.py mode change 100644 => 100755 qa/L0_batcher/test.sh mode change 100644 => 100755 qa/L0_batcher/verify_timestamps.py mode change 100644 => 100755 qa/L0_buffer_attributes/buffer_attributes_test.py mode change 100644 => 100755 qa/L0_buffer_attributes/test.sh mode change 100644 => 100755 qa/L0_client_java/test.sh mode change 100644 => 100755 qa/L0_client_memory_growth/client_memory_mail.py mode change 100644 => 100755 qa/L0_client_nobatch/client_test.py mode change 100644 => 100755 qa/L0_client_timeout/client_timeout_test.py mode change 100644 => 100755 qa/L0_client_timeout/test.sh mode change 100644 => 100755 qa/L0_cmdline_trace/trace_client.py mode change 100644 => 100755 qa/L0_cuda_graph/test.sh mode change 100644 => 100755 qa/L0_cuda_graph/trt_cuda_graph_test.py mode change 100644 => 100755 qa/L0_cuda_shared_memory/cuda_shared_memory_test.py mode change 100644 => 100755 qa/L0_cuda_shared_memory/test.sh mode change 100644 => 100755 qa/L0_custom_ops/cuda_op_test.py mode change 100644 => 100755 qa/L0_custom_ops/mod_op_test.py mode change 100644 => 100755 qa/L0_custom_ops/onnx_op_test.py mode change 100644 => 100755 qa/L0_custom_ops/vision_op_test.py mode change 100644 => 100755 qa/L0_custom_ops/zero_out_test.py mode change 100644 => 100755 qa/L0_data_compression/test.sh mode change 100644 => 100755 qa/L0_data_compression/validation.py mode change 100644 => 100755 qa/L0_decoupled/decoupled_test.py mode change 100644 => 100755 qa/L0_decoupled/test.sh mode change 100644 => 100755 qa/L0_device_memory_tracker/test.py mode change 100644 => 100755 qa/L0_device_memory_tracker/test.sh mode change 100644 => 100755 qa/L0_dlpack_multi_gpu/test.sh mode change 100644 => 100755 qa/L0_doc_links/test.sh mode change 100644 => 100755 qa/L0_dyna_implicit_state/test.sh mode change 100644 => 100755 qa/L0_dyna_sequence_batcher/dyna_sequence_batcher_test.py mode change 100644 => 100755 qa/L0_grpc/grpc_basic_auth_test.py mode change 100644 => 100755 qa/L0_grpc/grpc_client_plugin_test.py mode change 100644 => 100755 qa/L0_grpc/python_grpc_aio_test.py mode change 100644 => 100755 qa/L0_grpc/python_unit_test.py mode change 100644 => 100755 qa/L0_grpc/test.sh mode change 100644 => 100755 qa/L0_http/http_basic_auth_test.py mode change 100644 => 100755 qa/L0_http/http_client_plugin_test.py mode change 100644 => 100755 qa/L0_http/http_test.py mode change 100644 => 100755 qa/L0_http/python_http_aio_test.py mode change 100644 => 100755 qa/L0_http/test.sh mode change 100644 => 100755 qa/L0_http_fuzz/fuzztest.py mode change 100644 => 100755 qa/L0_http_fuzz/test.sh mode change 100644 => 100755 qa/L0_https/test.sh mode change 100644 => 100755 qa/L0_implicit_state/implicit_state.py mode change 100644 => 100755 qa/L0_implicit_state/test.sh mode change 100644 => 100755 qa/L0_infer/infer_test.py mode change 100644 => 100755 qa/L0_infer_reshape/infer_reshape_test.py mode change 100644 => 100755 qa/L0_infer_variable/infer_variable_test.py mode change 100644 => 100755 qa/L0_infer_zero/infer_zero_test.py mode change 100644 => 100755 qa/L0_inferentia_perf_analyzer/test.sh mode change 100644 => 100755 qa/L0_json/test.sh mode change 100644 => 100755 qa/L0_large_payload/large_payload_test.py mode change 100644 => 100755 qa/L0_large_payload/test.sh mode change 100644 => 100755 qa/L0_libtorch_inference_mode/test.sh mode change 100644 => 100755 qa/L0_libtorch_instance_group_kind_model/client.py mode change 100755 => 100644 qa/L0_libtorch_instance_group_kind_model/models/libtorch_multi_device/config.pbtxt mode change 100644 => 100755 qa/L0_libtorch_io_names/io_names_client.py mode change 100644 => 100755 qa/L0_libtorch_io_names/test.sh mode change 100644 => 100755 qa/L0_libtorch_nvfuser/test.sh mode change 100644 => 100755 qa/L0_libtorch_optimized_execution/test.sh mode change 100644 => 100755 qa/L0_libtorch_shared_weights/libtorch_shared_weights_test.py mode change 100644 => 100755 qa/L0_libtorch_shared_weights/test.sh mode change 100644 => 100755 qa/L0_lifecycle/lifecycle_test.py mode change 100644 => 100755 qa/L0_logging/logging_endpoint_test.py mode change 100644 => 100755 qa/L0_long_running_stress/crashing_client.py mode change 100644 => 100755 qa/L0_long_running_stress/scenarios.py mode change 100644 => 100755 qa/L0_long_running_stress/stress.py mode change 100644 => 100755 qa/L0_long_running_stress/stress_mail.py mode change 100644 => 100755 qa/L0_memory/test.sh mode change 100644 => 100755 qa/L0_memory_growth/busy_op_test.py mode change 100644 => 100755 qa/L0_memory_growth/server_memory_mail.py mode change 100644 => 100755 qa/L0_mlflow/plugin_test.py mode change 100755 => 100644 qa/L0_model_config/autofill_noplatform_success/onnx/cpu_instance/config.pbtxt mode change 100755 => 100644 qa/L0_model_config/autofill_noplatform_success/openvino/partial_config/config.pbtxt mode change 100755 => 100644 qa/L0_model_config/autofill_noplatform_success/tensorflow_savedmodel/reshape_config_provided/config.pbtxt mode change 100644 => 100755 qa/L0_model_config/compare_status.py mode change 100644 => 100755 qa/L0_model_config/noautofill_test.py mode change 100644 => 100755 qa/L0_model_namespacing/python_addsub/__init__.py mode change 100644 => 100755 qa/L0_model_namespacing/python_subadd/__init__.py mode change 100644 => 100755 qa/L0_model_namespacing/test.py mode change 100644 => 100755 qa/L0_model_namespacing/test.sh mode change 100755 => 100644 qa/L0_model_namespacing/test_duplication/addsub_repo/simple_addsub/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_duplication/subadd_repo/simple_subadd/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_dynamic_resolution/addsub_repo/simple_addsub/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_dynamic_resolution/subadd_repo/simple_subadd/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_ensemble_duplication/addsub_repo/simple_ensemble/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_ensemble_duplication/subadd_repo/simple_ensemble/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_no_duplication/addsub_repo/simple_addsub/config.pbtxt mode change 100755 => 100644 qa/L0_model_namespacing/test_no_duplication/subadd_repo/simple_subadd/config.pbtxt mode change 100644 => 100755 qa/L0_model_queue/model_queue_test.py mode change 100644 => 100755 qa/L0_model_update/instance_update_test.py mode change 100644 => 100755 qa/L0_multi_server/test.sh mode change 100644 => 100755 qa/L0_nan_inf/nan_inf_test.py mode change 100644 => 100755 qa/L0_nullchar_string/nullchar_string_client.py mode change 100644 => 100755 qa/L0_nullchar_string/test.sh mode change 100755 => 100644 qa/L0_optional_input/models/ensemble_identity_2_float32/config.pbtxt mode change 100755 => 100644 qa/L0_optional_input/models/identity_2_float32/config.pbtxt mode change 100755 => 100644 qa/L0_optional_input/models/pipeline_identity_2_float32/config.pbtxt mode change 100644 => 100755 qa/L0_optional_input/optional_input_test.py mode change 100644 => 100755 qa/L0_output_name/output_name_test.py mode change 100644 => 100755 qa/L0_output_name/test.sh mode change 100644 => 100755 qa/L0_output_validation/lt_op_val_client.py mode change 100644 => 100755 qa/L0_output_validation/test.sh mode change 100644 => 100755 qa/L0_parallel_copy/parallel_copy_test.py mode change 100644 => 100755 qa/L0_parameters/parameters_test.py mode change 100644 => 100755 qa/L0_parameters/test.sh mode change 100755 => 100644 qa/L0_passive_instance/models/distributed_int32_int32_int32/config.pbtxt mode change 100644 => 100755 qa/L0_passive_instance/passive_instance_test.py mode change 100644 => 100755 qa/L0_passive_instance/test.sh mode change 100644 => 100755 qa/L0_perf_analyzer_doc_links/test.sh mode change 100644 => 100755 qa/L0_perf_kaldi/create_data.sh mode change 100644 => 100755 qa/L0_perf_kaldi/test.sh mode change 100644 => 100755 qa/L0_perf_pyclients/simple_perf_client.py mode change 100644 => 100755 qa/L0_query/query_e2e.py mode change 100644 => 100755 qa/L0_query/test.sh mode change 100644 => 100755 qa/L0_rate_limiter/rate_limiter_test.py mode change 100644 => 100755 qa/L0_rate_limiter/test.sh mode change 100644 => 100755 qa/L0_register/test.sh mode change 100644 => 100755 qa/L0_repoagent_checksum/identity_test.py mode change 100644 => 100755 qa/L0_sagemaker/sagemaker_multi_model_test.py mode change 100644 => 100755 qa/L0_sagemaker/sagemaker_test.py mode change 100644 => 100755 qa/L0_savedmodel_shape/saved_model_shape_test.py mode change 100644 => 100755 qa/L0_savedmodel_shape/test.sh mode change 100644 => 100755 qa/L0_secure_grpc/test.sh mode change 100644 => 100755 qa/L0_sequence_batcher/sequence_batcher_test.py mode change 100644 => 100755 qa/L0_sequence_corrid_batcher/sequence_corrid_batcher_test.py mode change 100644 => 100755 qa/L0_sequence_stress/sequence_stress.py mode change 100644 => 100755 qa/L0_server_status/server_status_test.py mode change 100644 => 100755 qa/L0_shared_memory/shared_memory_test.py mode change 100644 => 100755 qa/L0_shared_memory/test.sh mode change 100644 => 100755 qa/L0_simple_ensemble/ensemble_test.py mode change 100644 => 100755 qa/L0_simple_nodejs_client/test.sh mode change 100644 => 100755 qa/L0_socket/test.sh mode change 100644 => 100755 qa/L0_storage_S3_local/mock_s3_service.py mode change 100644 => 100755 qa/L0_storage_swiftstack/infer_test.py mode change 100644 => 100755 qa/L0_string_io/string_client_test.py mode change 100644 => 100755 qa/L0_tf_gpu_io/tf_gpu_io_test.py mode change 100644 => 100755 qa/L0_tf_parameters/test.sh mode change 100644 => 100755 qa/L0_tf_parameters/tf_parameter_test.py mode change 100644 => 100755 qa/L0_tf_tag_sigdef/tf_tag_sigdef_test.py mode change 100644 => 100755 qa/L0_tf_unknown_rank/test.sh mode change 100644 => 100755 qa/L0_tf_unknown_rank/tf_unknown_rank_test.py mode change 100644 => 100755 qa/L0_tftrt_optimization/tftrt_optimization_test.py mode change 100644 => 100755 qa/L0_trace/trace_endpoint_test.py mode change 100644 => 100755 qa/L0_triton_repo_agent/test.sh mode change 100644 => 100755 qa/L0_trt_data_dependent_shape/trt_data_dependent_shape_test.py mode change 100644 => 100755 qa/L0_trt_dla/dla_test.py mode change 100644 => 100755 qa/L0_trt_dla/test.sh mode change 100644 => 100755 qa/L0_trt_dynamic_shape/trt_dynamic_shape_test.py mode change 100644 => 100755 qa/L0_trt_error_propagation/trt_error_propagation_test.py mode change 100644 => 100755 qa/L0_trt_plugin/test.sh mode change 100644 => 100755 qa/L0_trt_plugin/trt_plugin_test.py mode change 100644 => 100755 qa/L0_trt_reformat_free/trt_reformat_free_test.py mode change 100644 => 100755 qa/L0_trt_shape_tensors/test.sh mode change 100644 => 100755 qa/L0_trt_shape_tensors/trt_shape_tensor_test.py mode change 100644 => 100755 qa/L0_vertex_ai/test.sh mode change 100644 => 100755 qa/L0_vertex_ai/vertex_ai_test.py mode change 100644 => 100755 qa/L0_warmup/test.sh mode change 100644 => 100755 qa/common/gen_ensemble_model_utils.py mode change 100644 => 100755 qa/common/gen_qa_custom_ops_models.py mode change 100644 => 100755 qa/common/gen_qa_dyna_sequence_implicit_models.py mode change 100644 => 100755 qa/common/gen_qa_dyna_sequence_models.py mode change 100644 => 100755 qa/common/gen_qa_identity_models.py mode change 100644 => 100755 qa/common/gen_qa_implicit_models.py mode change 100644 => 100755 qa/common/gen_qa_models.py mode change 100644 => 100755 qa/common/gen_qa_noshape_models.py mode change 100644 => 100755 qa/common/gen_qa_ragged_models.py mode change 100644 => 100755 qa/common/gen_qa_reshape_models.py mode change 100644 => 100755 qa/common/gen_qa_sequence_models.py mode change 100644 => 100755 qa/common/gen_qa_tf_parameters.py mode change 100644 => 100755 qa/common/gen_qa_torchtrt_models.py mode change 100644 => 100755 qa/common/gen_qa_trt_data_dependent_shape.py mode change 100644 => 100755 qa/common/gen_qa_trt_format_models.py mode change 100644 => 100755 qa/common/gen_qa_trt_plugin_models.py mode change 100644 => 100755 qa/common/gen_tag_sigdef.py mode change 100644 => 100755 qa/common/infer_test.py mode change 100644 => 100755 qa/common/infer_util.py mode change 100644 => 100755 qa/common/inferentia_perf_analyzer_input_data_json/simple_model.py mode change 100644 => 100755 qa/common/libtorch_infer_client.py mode change 100644 => 100755 qa/common/nightly_email_helper.py mode change 100644 => 100755 qa/common/sequence_util.py mode change 100644 => 100755 qa/common/shm_util.py mode change 100644 => 100755 qa/common/test_util.py mode change 100755 => 100644 qa/custom_models/custom_zero_1_float32/config.pbtxt mode change 100644 => 100755 qa/python_models/model_init_del/util.py mode change 100644 => 100755 qa/python_models/multi_file/file1.py mode change 100644 => 100755 qa/python_models/multi_file/file2.py mode change 100755 => 100644 qa/python_models/torchvision/resnet50/config.pbtxt diff --git a/.clang-format b/.clang-format index 98c649734c..1defc175de 100644 --- a/.clang-format +++ b/.clang-format @@ -2,6 +2,7 @@ BasedOnStyle: Google IndentWidth: 2 +ColumnLimit: 80 ContinuationIndentWidth: 4 UseTab: Never MaxEmptyLinesToKeep: 2 @@ -34,4 +35,5 @@ BinPackArguments: true BinPackParameters: true ConstructorInitializerAllOnOneLineOrOnePerLine: false -IndentCaseLabels: true \ No newline at end of file +IndentCaseLabels: true + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a724718d46..745a33730b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,13 +27,7 @@ name: "CodeQL" on: - push: - branches: [ 'main' ] pull_request: - # The branches below must be a subset of the branches above - branches: [ 'main' ] - schedule: - - cron: '0 1 * * 1-6' jobs: analyze: @@ -63,12 +57,12 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to: # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs queries: +security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -77,7 +71,7 @@ jobs: # Command-line programs to run using the OS shell. # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000000..531cc2911b --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,39 @@ +# Copyright 2023, 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 +# 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. + +name: pre-commit + +on: + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0 + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..f44f815351 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,74 @@ +# Copyright 2023, 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 +# 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. + +repos: +- repo: https://github.com/timothycrosley/isort + rev: 5.12.0 + hooks: + - id: isort + additional_dependencies: [toml] +- repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + types_or: [python, cython] +- repo: https://github.com/PyCQA/flake8 + rev: 5.0.4 + hooks: + - id: flake8 + args: [--max-line-length=88, --select=C,E,F,W,B,B950, --extend-ignore = E203,E501] + types_or: [python, cython] +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: v16.0.5 + hooks: + - id: clang-format + types_or: [c, c++, cuda, proto, textproto, java] + args: ["-fallback-style=none", "-style=file", "-i"] +- repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + additional_dependencies: [tomli] + args: ["--toml", "pyproject.toml"] + exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) +# More details about these pre-commit hooks here: +# https://pre-commit.com/hooks.html +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-json + - id: check-toml + - id: check-yaml + exclude: ^deploy(\/[^\/]+)*\/templates\/.*$ + - id: check-shebang-scripts-are-executable + - id: end-of-file-fixer + types_or: [c, c++, cuda, proto, textproto, java, python] + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace diff --git a/CMakeLists.txt b/CMakeLists.txt index a2031f1bdb..7ea6dbddf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,7 @@ if(EXISTS "/etc/os-release") set (LIB_DIR "lib64") endif() endif() - + set(TRITON_CORE_HEADERS_ONLY OFF) FetchContent_MakeAvailable(repo-third-party repo-core) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ca236651e..59e0ace975 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ -# Deploy Triton Inference Server on PAI-EAS +# Deploy Triton Inference Server on PAI-EAS * Table Of Contents - [Description](https://yuque.alibaba-inc.com/pai/blade/mtptqc#Description) - [Prerequisites](https://yuque.alibaba-inc.com/pai/blade/mtptqc#Prerequisites) @@ -57,11 +57,11 @@ Download the tensorflow inception model via [fetch_model.sh](https://github.com/ The following is the json we use when creating a Triton Server on EAS. ``` { - "name": "", + "name": "", "processor": "triton", "processor_params": [ - "--model-repository=oss://triton-model-repo/models", - "--allow-grpc=true", + "--model-repository=oss://triton-model-repo/models", + "--allow-grpc=true", "--allow-http=true" ], "metadata": { diff --git a/deploy/aws/README.md b/deploy/aws/README.md index 600f8c953f..4e60fdd65b 100644 --- a/deploy/aws/README.md +++ b/deploy/aws/README.md @@ -1,5 +1,5 @@