Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add model_metric message #126

Merged
merged 10 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/triton/common/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once

#include <string>
#include <cstdint>
#include <string>

namespace triton { namespace common {

Expand Down
86 changes: 86 additions & 0 deletions protobuf/model_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,85 @@ message ModelResponseCache
bool enable = 1;
}

//@@
//@@ .. cpp:var:: message ModelMetrics
//@@
//@@ The metrics setting of this model.
//@@ NOTE: Consider reusing this message body for backend metric custom
//@@ configuration.
//@@
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.
//@@ All core histogram metrics reported by Triton are customizable.
//@@
// https://github.com/triton-inference-server/server/blob/main/docs/user_guide/metrics.md#histograms
yinggeh marked this conversation as resolved.
Show resolved Hide resolved
//@@
string family = 1;
}

//@@ .. cpp:var:: message HistogramOptions
//@@
//@@ Histogram metrics options.
//@@
message HistogramOptions
{
//@@ .. cpp:var:: double buckets (repeated)
//@@
//@@ Repeated double type in ascending order for histogram bucket
//@@ 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;
GuanLuo marked this conversation as resolved.
Show resolved Hide resolved
}

//@@ .. 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
//@@
//@@ Histogram options.
//@@
HistogramOptions histogram_options = 2;
}
}

//@@
//@@ .. cpp::var:: MetricControl metric_control (repeated)
//@@
//@@ Optional custom configuration for selected metrics.
yinggeh marked this conversation as resolved.
Show resolved Hide resolved
//@@
repeated MetricControl metric_control = 1;
}

//@@
//@@.. cpp:var:: message ModelConfig
//@@
Expand Down Expand Up @@ -2076,4 +2155,11 @@ message ModelConfig
//@@ model.
//@@
ModelResponseCache response_cache = 24;

//@@ .. 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;
}
Loading