From a26a083755da584ce3b117e09c907d4b0f90c71c Mon Sep 17 00:00:00 2001 From: kthui <18255193+kthui@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:49:42 -0800 Subject: [PATCH] [chore] Set bool config param to accept only true/false - compat breaking --- README.md | 4 ++-- ci/L0_backend_vllm/metrics_test/test.sh | 10 +++++----- src/model.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f3baf018..b90edcfc 100644 --- a/README.md +++ b/README.md @@ -307,11 +307,11 @@ or left empty (false by default) in [model.json](https://github.com/triton-infer *Note:* vLLM metrics are not reported to Triton metrics server by default due to potential performance slowdowns. To enable vLLM model's metrics reporting, please add following lines to its config.pbtxt as well. -```bash +``` parameters: { key: "REPORT_CUSTOM_METRICS" value: { - string_value:"yes" + string_value: "true" } } ``` diff --git a/ci/L0_backend_vllm/metrics_test/test.sh b/ci/L0_backend_vllm/metrics_test/test.sh index fd976d4a..21573bda 100755 --- a/ci/L0_backend_vllm/metrics_test/test.sh +++ b/ci/L0_backend_vllm/metrics_test/test.sh @@ -98,14 +98,14 @@ parameters: { " >> models/vllm_opt/config.pbtxt run_test VLLMTritonMetricsTest.test_vllm_metrics_disabled -# Test vLLM metrics reporting with parameter "REPORT_CUSTOM_METRICS" set to "yes" in config.pbtxt +# Test vLLM metrics reporting with parameter "REPORT_CUSTOM_METRICS" set to "true" in config.pbtxt copy_model_repository cp ${SAMPLE_MODELS_REPO}/vllm_model/config.pbtxt models/vllm_opt echo -e " parameters: { key: \"REPORT_CUSTOM_METRICS\" value: { - string_value:\"yes\" + string_value: \"true\" } } " >> models/vllm_opt/config.pbtxt @@ -120,7 +120,7 @@ echo -e " parameters: { key: \"REPORT_CUSTOM_METRICS\" value: { - string_value:\"yes\" + string_value: \"true\" } } " >> models/vllm_opt/config.pbtxt @@ -134,7 +134,7 @@ echo -e " parameters: { key: \"REPORT_CUSTOM_METRICS\" value: { - string_value:\"yes\" + string_value: \"true\" } } " >> models/vllm_opt/config.pbtxt @@ -146,7 +146,7 @@ echo -e " parameters: { key: \"REPORT_CUSTOM_METRICS\" value: { - string_value:\"yes\" + string_value: \"true\" } } " >> models/vllm_opt/config.pbtxt diff --git a/src/model.py b/src/model.py index a016f104..b9fd25a9 100644 --- a/src/model.py +++ b/src/model.py @@ -236,7 +236,7 @@ def init_engine(self): def _get_bool_config_param(self, param_name: str) -> bool: return (param_name in self.model_config["parameters"]) and ( self.model_config["parameters"][param_name]["string_value"].lower() - in ["yes", "true"] + == "true" ) def setup_lora(self):