Skip to content

Commit

Permalink
Review comments and unit fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
indrajit96 committed Oct 14, 2024
1 parent c34d91b commit b7986bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/metric_model_reporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MetricModelReporter {
const MetricReporterConfig& Config();
// Lookup counter metric by name, and increment it by value if it exists.
void IncrementCounter(const std::string& name, double value);
// Increase gauge by value.
// Set gauge value.
void SetGauge(const std::string& name, double value);
// Increase gauge by value.
void IncrementGauge(const std::string& name, double value);
Expand Down
2 changes: 1 addition & 1 deletion src/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Metrics::Metrics()

model_load_time_family_(prometheus::BuildGauge()
.Name("nv_model_load_time")
.Help("Load Time per-model in nanoseconds")
.Help("Load Time per-model in seconds")
.Register(*registry_)),

pinned_memory_pool_total_family_(
Expand Down
3 changes: 0 additions & 3 deletions src/model_repository_manager/model_lifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ ModelLifeCycle::AsyncLoad(
load_pool_->Enqueue([this, model_id, version, model_info, OnComplete,
load_tracker, is_config_provided]() {
for (size_t retry = 0; retry <= options_.load_retry; ++retry) {
// TODO add here
model_info->state_ = ModelReadyState::LOADING;
CreateModel(model_id, version, model_info, is_config_provided);
// Model state will be changed to NOT loading if failed to load,
Expand Down Expand Up @@ -866,8 +865,6 @@ ModelLifeCycle::ReportModelLoadTime(
const std::chrono::duration<double>& time_to_load)
{
#ifdef TRITON_ENABLE_METRICS
// Pending request count should always be 0 or 1 per-request. A request should
// not decrement the count unless it has already been incremented.
if (reporter) {
double load_time_in_seconds = time_to_load.count();
reporter->SetGauge(kModelLoadTimeMetric, load_time_in_seconds);
Expand Down

0 comments on commit b7986bd

Please sign in to comment.