Skip to content

Commit 2cfa1b7

Browse files
MediaPipe generic metrics documentation (#2691)
CVS-151870 --------- Co-authored-by: Adrian Tobiszewski <[email protected]>
1 parent 07842a2 commit 2cfa1b7

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

docs/metrics.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ However, you can enable also additional metrics by listing all the metrics you w
2828
Default metrics
2929
| Type | Name | Labels | Description |
3030
| :--- | :---- | :---- | :---- |
31-
| gauge | ovms_streams | name,version | Number of OpenVINO execution streams |
32-
| gauge | ovms_current_requests | name,version | Number of requests being currently processed by the model server |
31+
| gauge | ovms_streams | name,version | Number of OpenVINO execution streams. |
32+
| gauge | ovms_current_requests | name,version | Number of requests being currently processed by the model server. |
33+
| gauge | ovms_current_graphs | name | Number of MediaPipe graphs in process. |
3334
| counter | ovms_requests_success | api,interface,method,name,version | Number of successful requests to a model or a DAG. |
3435
| counter | ovms_requests_fail | api,interface,method,name,version | Number of failed requests to a model or a DAG. |
36+
| counter | ovms_requests_accepted | api,interface,method,name | Number of accepted requests which ended up inserting packet(s) into a MediaPipe graph. |
37+
| counter | ovms_requests_rejected | api,interface,method,name | Number of rejected which failed at MediaPipe packet creation step. |
38+
| counter | ovms_responses | api,interface,method,name | Number of responses generated by the MediaPipe graph. |
3539
| histogram | ovms_request_time_us | interface,name,version | Processing time of requests to a model or a DAG. |
3640
| histogram | ovms_inference_time_us | name,version | Inference execution time in the OpenVINO backend. |
3741
| histogram | ovms_wait_for_infer_req_time_us | name,version | Request waiting time in the scheduling queue. Indicates how long the request has to wait before required resources are assigned to it. |
@@ -47,11 +51,11 @@ Optional metrics
4751
Labels description
4852
| Name | Values | Description |
4953
| :--- | :---- | :---- |
50-
| api | KServe, TensorFlowServing | Name of the serving API. |
54+
| api | KServe, TensorFlowServing, V3 | Name of the serving API. |
5155
| interface | REST, gRPC | Name of the serving interface. |
52-
| method | ModelMetadata, ModelReady, ModelInfer, Predict, GetModelStatus, GetModelMetadata | Interface methods. |
53-
| version | 1, 2, ..., n | Model version. Note that GetModelStatus and ModelReady do not have the version label. |
54-
| name | As defined in model server config | Model name or DAG name. |
56+
| method | ModelMetadata, ModelReady, ModelInfer, Predict, GetModelStatus, GetModelMetadata, Unary, Stream | Interface methods. |
57+
| version | 1, 2, ..., n | Model version. Note that GetModelStatus and ModelReady and all MediaPipe servables do not have the version label. |
58+
| name | As defined in model server config | Model name, DAG name or MediaPipe graph name. |
5559

5660

5761
## Enable metrics
@@ -175,10 +179,14 @@ echo '{
175179
"metrics_list":
176180
[ "ovms_requests_success",
177181
"ovms_requests_fail",
182+
"ovms_requests_accepted",
183+
"ovms_requests_rejected",
184+
"ovms_responses",
178185
"ovms_inference_time_us",
179186
"ovms_wait_for_infer_req_time_us",
180187
"ovms_request_time_us",
181188
"ovms_current_requests",
189+
"ovms_current_graphs",
182190
"ovms_infer_req_active",
183191
"ovms_streams",
184192
"ovms_infer_req_queue_size"]
@@ -224,7 +232,17 @@ It means that each request to the DAG pipeline will update also the metrics for
224232

225233
## Metrics implementation for MediaPipe Graphs
226234

227-
For [MediaPipe Graphs](./mediapipe.md) metrics endpoint is not supported.
235+
For [MediaPipe Graphs](./mediapipe.md) execution there are 4 generic metrics which apply to all graphs:
236+
237+
| Type | Name | Description |
238+
| :--- | :---- | :---- |
239+
| counter | ovms_requests_accepted | Counts number of requests which ended up pushing MediaPipe packet down the graph stream. For example image frame in vision use cases, LLM prompt in text generation use cases. |
240+
| counter | ovms_requests_rejected | Counts errors in MediaPipe packet creation phase. For example bad image format in vision use cases. Please note that for V3 API, the LLM request is validated at graph node level meaning that packet creation always succeeds. Please refer to specific graph definition and implementation. |
241+
| counter | ovms_responses | Useful to track number of packets generated by MediaPipe graph. Keep in mind that single request may trigger production of multiple (or zero) packets, therefore tracking number of responses is complementary to tracking accepted requests. For example tracking streaming partial responses of LLM text generation graphs. |
242+
| gauge | ovms_current_graphs | Number of graphs currently in-process. For unary communication it is equal to number of currently processing requests (each request initializes separate MediaPipe graph). For streaming communication it is equal to number of active client connections. Each connection is able to reuse the graph and decide when to delete it when the connection is closed. |
243+
244+
Exposing custom metrics in calculator implementations (MediaPipe graph nodes) is not supported yet.
245+
228246

229247
## Visualize with Grafana
230248

0 commit comments

Comments
 (0)