Skip to content

fix: feature category labels in model instrumentation

Shinya Maeda requested to merge fix-feature-category-instrument-labels into main

What does this merge request do and why?

This MR fixes that the feature category labels in model instrumentator directly refers the Python Enum class GitLabFeatureCategory.

Before:

model_inferences_created{error="no",feature_category="GitLabFeatureCategory.DUO_CHAT",model_engine="anthropic",model_name="claude-2.1",streaming="no"} 1.716962744591374e+09

After:

model_inferences_created{error="no",feature_category="duo_chat",model_engine="anthropic",model_name="claude-2.1",streaming="no"} 

Ref: https://thanos-query.ops.gitlab.net/graph?g0.expr=model_inferences_total%7Bmodel_name%3D%22text-bison%22%7D&g0.tab=1&g0.stacked=0&g0.range_input=1h&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D

How to set up and validate locally

  1. Try model call
  2. Access http://0.0.0.0:8082/

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Shinya Maeda

Merge request reports