From 3a9b80cfcf45cc9ca4273874b6f1c9ded142cd4f Mon Sep 17 00:00:00 2001 From: Yingge He Date: Thu, 24 Oct 2024 11:01:48 -0700 Subject: [PATCH 01/10] Add ModelMetric message --- protobuf/model_config.proto | 75 +++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index c27421e..51467bf 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1869,6 +1869,75 @@ message ModelResponseCache bool enable = 1; } +//@@ +//@@ .. cpp:var:: message ModelMetrics +//@@ +//@@ The metrics setting of this model. +//@@ +message ModelMetrics +{ + //@@ + //@@ .. cpp:var:: message MetricControl + //@@ + //@@ Override metrics settings of this model. + //@@ + message MetricControl + { + //@@ + //@@ .. cpp:var:: message MetricIdentifier + //@@ + //@@ Specify metrics to be overridden with metric_option + //@@ + message MetricIdentifier + { + //@@ .. cpp:var:: string family + //@@ + //@@ The name of the metric family to override + //@@ with the custom value. + //@@ + string family = 1; + } + + //@@ .. cpp:var:: message HistogramOptions + //@@ + //@@ Histogram metrics options + //@@ + message HistogramOptions { + //@@ .. cpp:var:: double buckets (repeated) + //@@ + //@@ Repeated double type + //@@ + repeated double buckets = 1; + } + + //@@ .. cpp:var:: MetricIdentifier metric_identifier + //@@ + //@@ The identifier defining metrics to be overridden with the metric_options + //@@ + MetricIdentifier metric_identifier = 1; + + //@@ .. cpp:var:: oneof metric_options + //@@ + //@@ The value to override the metrics defined in metric_identifier. + //@@ + oneof metric_options + { + //@@ .. cpp:var:: HistogramOptions histogram_options + //@@ + //@@ The custom histogram options. + //@@ + HistogramOptions histogram_options = 2; + } + } + + //@@ + //@@ .. cpp::var:: MetricControl metric_control (repeated) + //@@ + //@@ Optional custom configuration for selected metrics. + //@@ + repeated MetricControl metric_control = 1; +} + //@@ //@@.. cpp:var:: message ModelConfig //@@ @@ -2076,4 +2145,10 @@ message ModelConfig //@@ model. //@@ ModelResponseCache response_cache = 24; + + //@@ .. cpp:var:: ModelMetrics model_metrics + //@@ + //@@ Optional setting for custom metrics configuration for this model. + //@@ + ModelMetrics model_metrics = 26; } From 2bd13b9d55cd3543b9b1ba1cf1f7bdf68b010c5d Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 28 Oct 2024 18:12:28 -0700 Subject: [PATCH 02/10] Fix pre-comment errors --- include/triton/common/error.h | 2 +- protobuf/model_config.proto | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/triton/common/error.h b/include/triton/common/error.h index cf9f0a9..ce35ab4 100644 --- a/include/triton/common/error.h +++ b/include/triton/common/error.h @@ -25,8 +25,8 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include #include +#include namespace triton { namespace common { diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 51467bf..375923a 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1886,7 +1886,7 @@ message ModelMetrics //@@ //@@ .. cpp:var:: message MetricIdentifier //@@ - //@@ Specify metrics to be overridden with metric_option + //@@ Specify metrics to be overridden with metric_option. //@@ message MetricIdentifier { @@ -1900,19 +1900,21 @@ message ModelMetrics //@@ .. cpp:var:: message HistogramOptions //@@ - //@@ Histogram metrics options + //@@ Histogram metrics options. //@@ - message HistogramOptions { + message HistogramOptions + { //@@ .. cpp:var:: double buckets (repeated) //@@ - //@@ Repeated double type + //@@ Repeated double type for histogram bucket boundaries. //@@ repeated double buckets = 1; } //@@ .. cpp:var:: MetricIdentifier metric_identifier //@@ - //@@ The identifier defining metrics to be overridden with the metric_options + //@@ The identifier defining metrics to be overridden with the + //@@ metric_options. //@@ MetricIdentifier metric_identifier = 1; @@ -1922,11 +1924,11 @@ message ModelMetrics //@@ oneof metric_options { - //@@ .. cpp:var:: HistogramOptions histogram_options - //@@ - //@@ The custom histogram options. - //@@ - HistogramOptions histogram_options = 2; + //@@ .. cpp:var:: HistogramOptions histogram_options + //@@ + //@@ The custom histogram options. + //@@ + HistogramOptions histogram_options = 2; } } From 4e9a52849a235cc2401dc10113a43c7b605f25e3 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Wed, 30 Oct 2024 12:45:49 -0700 Subject: [PATCH 03/10] Address comments --- protobuf/model_config.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 375923a..d1d5ed0 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1926,7 +1926,7 @@ message ModelMetrics { //@@ .. cpp:var:: HistogramOptions histogram_options //@@ - //@@ The custom histogram options. + //@@ Histogram options. //@@ HistogramOptions histogram_options = 2; } @@ -2151,6 +2151,7 @@ message ModelConfig //@@ .. cpp:var:: ModelMetrics model_metrics //@@ //@@ Optional setting for custom metrics configuration for this model. + //@@ Application default is applied to metrics that are not specified. //@@ ModelMetrics model_metrics = 26; } From 69e6fa688294506d9f6c3d1cd91a65e0aaefe6ee Mon Sep 17 00:00:00 2001 From: Yingge He Date: Wed, 30 Oct 2024 20:26:28 -0700 Subject: [PATCH 04/10] Update comments --- protobuf/model_config.proto | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index d1d5ed0..4cb847f 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1872,7 +1872,8 @@ message ModelResponseCache //@@ //@@ .. cpp:var:: message ModelMetrics //@@ -//@@ The metrics setting of this model. +//@@ The metrics setting of this model. Consider reusing this message body +//@@ for backend metric custom configuration. //@@ message ModelMetrics { @@ -1892,8 +1893,9 @@ message ModelMetrics { //@@ .. cpp:var:: string family //@@ - //@@ The name of the metric family to override - //@@ with the custom value. + //@@ The name of the metric family to override with the custom value. + //@@ Check the list of supported metric families + //@@ https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms //@@ string family = 1; } From 376f2526ac25d883aa3d5158fc5816fe78dfee6d Mon Sep 17 00:00:00 2001 From: Yingge He Date: Wed, 30 Oct 2024 20:36:43 -0700 Subject: [PATCH 05/10] Fix pre-commit --- protobuf/model_config.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 4cb847f..5e8e724 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1895,7 +1895,8 @@ message ModelMetrics //@@ //@@ The name of the metric family to override with the custom value. //@@ Check the list of supported metric families - //@@ https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms + //@@ + // https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms //@@ string family = 1; } From 9aae276d2b7047d69e595b5d366ee541a92fa24c Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 4 Nov 2024 00:12:57 -0800 Subject: [PATCH 06/10] Update comments --- protobuf/model_config.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 5e8e724..0f0c64d 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1896,7 +1896,7 @@ message ModelMetrics //@@ The name of the metric family to override with the custom value. //@@ Check the list of supported metric families //@@ - // https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms + //@@ https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms //@@ string family = 1; } @@ -1909,7 +1909,8 @@ message ModelMetrics { //@@ .. cpp:var:: double buckets (repeated) //@@ - //@@ Repeated double type for histogram bucket boundaries. + //@@ Repeated double type in ascending order for histogram bucket + //@@ boundaries. For example: [ -5.0, -2, 0, 3.5, 5 ]. //@@ repeated double buckets = 1; } From a3a5e2f12c465995aaf3e1d7eaddc6fc9ff382c3 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 4 Nov 2024 15:51:41 -0800 Subject: [PATCH 07/10] Fix pre-commit --- protobuf/model_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 0f0c64d..8599e47 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1896,7 +1896,7 @@ message ModelMetrics //@@ The name of the metric family to override with the custom value. //@@ Check the list of supported metric families //@@ - //@@ https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms + // https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms //@@ string family = 1; } From 3ae2fb301682ee83f2abe1f60ad000fff411d9fe Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 4 Nov 2024 16:57:09 -0800 Subject: [PATCH 08/10] Update comments --- protobuf/model_config.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 8599e47..c2d8042 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1894,7 +1894,7 @@ message ModelMetrics //@@ .. cpp:var:: string family //@@ //@@ The name of the metric family to override with the custom value. - //@@ Check the list of supported metric families + //@@ All core histogram metrics reported by Triton are customizable. //@@ // https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms //@@ @@ -1910,7 +1910,8 @@ message ModelMetrics //@@ .. cpp:var:: double buckets (repeated) //@@ //@@ Repeated double type in ascending order for histogram bucket - //@@ boundaries. For example: [ -5.0, -2, 0, 3.5, 5 ]. + //@@ boundaries. Each value represents a bucket range less than or + //@@ equal to itself. For example, [ -5.0, -2, 0, 3.5, 5 ]. //@@ repeated double buckets = 1; } From a46874a46956d6454461946cbe313f39283bfc13 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Mon, 4 Nov 2024 17:32:54 -0800 Subject: [PATCH 09/10] Updated comment --- protobuf/model_config.proto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index c2d8042..45d610c 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1910,8 +1910,10 @@ message ModelMetrics //@@ .. cpp:var:: double buckets (repeated) //@@ //@@ Repeated double type in ascending order for histogram bucket - //@@ boundaries. Each value represents a bucket range less than or - //@@ equal to itself. For example, [ -5.0, -2, 0, 3.5, 5 ]. + //@@ boundaries. Each bucket value represents a range less than or + //@@ equal to itself. The range greater than the largest bucket value + //@@ is allocated implicitly. + //@@ For example, [ -5.0, -2, 0, 3.5, 5 ]. //@@ repeated double buckets = 1; } From 744d75dc591ed3f265610fb48dd1042c1e7e5d04 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Tue, 5 Nov 2024 16:19:05 -0800 Subject: [PATCH 10/10] Add "Note" --- protobuf/model_config.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protobuf/model_config.proto b/protobuf/model_config.proto index 45d610c..166cbb0 100644 --- a/protobuf/model_config.proto +++ b/protobuf/model_config.proto @@ -1872,8 +1872,9 @@ message ModelResponseCache //@@ //@@ .. cpp:var:: message ModelMetrics //@@ -//@@ The metrics setting of this model. Consider reusing this message body -//@@ for backend metric custom configuration. +//@@ The metrics setting of this model. +//@@ NOTE: Consider reusing this message body for backend metric custom +//@@ configuration. //@@ message ModelMetrics {