|
1 | | -// Copyright 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 1 | +// Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
2 | 2 | // |
3 | 3 | // Redistribution and use in source and binary forms, with or without |
4 | 4 | // modification, are permitted provided that the following conditions |
@@ -42,8 +42,7 @@ namespace triton { namespace core { |
42 | 42 | // |
43 | 43 | void |
44 | 44 | MetricReporterConfig::ParseConfig( |
45 | | - bool response_cache_enabled, bool is_decoupled, |
46 | | - const inference::ModelMetrics& model_metrics) |
| 45 | + bool response_cache_enabled, const inference::ModelMetrics& model_metrics) |
47 | 46 | { |
48 | 47 | // Global config only for now in config map |
49 | 48 | auto metrics_config_map = Metrics::ConfigMap(); |
@@ -74,7 +73,6 @@ MetricReporterConfig::ParseConfig( |
74 | 73 |
|
75 | 74 | // Set flag to signal to stats aggregator if caching is enabled or not |
76 | 75 | cache_enabled_ = response_cache_enabled; |
77 | | - is_decoupled_ = is_decoupled; |
78 | 76 |
|
79 | 77 | // Override default histogram options if set in model_metrics. |
80 | 78 | for (const auto& metric_control : model_metrics.metric_control()) { |
@@ -139,7 +137,7 @@ const std::map<FailureReason, std::string> |
139 | 137 | Status |
140 | 138 | MetricModelReporter::Create( |
141 | 139 | const ModelIdentifier& model_id, const int64_t model_version, |
142 | | - const int device, bool response_cache_enabled, bool is_decoupled, |
| 140 | + const int device, bool response_cache_enabled, |
143 | 141 | const triton::common::MetricTagsMap& model_tags, |
144 | 142 | const inference::ModelMetrics& model_metrics, |
145 | 143 | std::shared_ptr<MetricModelReporter>* metric_model_reporter) |
@@ -169,23 +167,23 @@ MetricModelReporter::Create( |
169 | 167 | } |
170 | 168 |
|
171 | 169 | metric_model_reporter->reset(new MetricModelReporter( |
172 | | - model_id, model_version, device, response_cache_enabled, is_decoupled, |
173 | | - model_tags, model_metrics)); |
| 170 | + model_id, model_version, device, response_cache_enabled, model_tags, |
| 171 | + model_metrics)); |
174 | 172 | reporter_map.insert({hash_labels, *metric_model_reporter}); |
175 | 173 | return Status::Success; |
176 | 174 | } |
177 | 175 |
|
178 | 176 | MetricModelReporter::MetricModelReporter( |
179 | 177 | const ModelIdentifier& model_id, const int64_t model_version, |
180 | | - const int device, bool response_cache_enabled, bool is_decoupled, |
| 178 | + const int device, bool response_cache_enabled, |
181 | 179 | const triton::common::MetricTagsMap& model_tags, |
182 | 180 | const inference::ModelMetrics& model_metrics) |
183 | 181 | { |
184 | 182 | std::map<std::string, std::string> labels; |
185 | 183 | GetMetricLabels(&labels, model_id, model_version, device, model_tags); |
186 | 184 |
|
187 | 185 | // Parse metrics config to control metric setup and behavior |
188 | | - config_.ParseConfig(response_cache_enabled, is_decoupled, model_metrics); |
| 186 | + config_.ParseConfig(response_cache_enabled, model_metrics); |
189 | 187 |
|
190 | 188 | // Initialize families and metrics |
191 | 189 | InitializeCounters(labels); |
@@ -306,12 +304,9 @@ MetricModelReporter::InitializeHistograms( |
306 | 304 | const std::map<std::string, std::string>& labels) |
307 | 305 | { |
308 | 306 | // Update MetricReporterConfig::metric_map_ for new histograms. |
309 | | - // Only create response metrics if decoupled model to reduce metric output |
310 | 307 | if (config_.latency_histograms_enabled_) { |
311 | | - if (config_.is_decoupled_) { |
312 | | - histogram_families_[kFirstResponseHistogram] = |
313 | | - &Metrics::FamilyFirstResponseDuration(); |
314 | | - } |
| 308 | + histogram_families_[kFirstResponseHistogram] = |
| 309 | + &Metrics::FamilyFirstResponseDuration(); |
315 | 310 | } |
316 | 311 |
|
317 | 312 | for (auto& iter : histogram_families_) { |
|
0 commit comments