metrics
get_container_stats(docker_socket_path)
¶
Gets the container stats.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the container stats. |
Source code in inference/core/managers/metrics.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
get_model_metrics(inference_server_id, model_id, min=-1, max=float('inf'))
¶
Gets the metrics for a given model between a specified time range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_id
|
str
|
The identifier of the device. |
required |
model_id
|
str
|
The identifier of the model. |
required |
start
|
float
|
The starting timestamp of the time range. Defaults to -1. |
required |
stop
|
float
|
The ending timestamp of the time range. Defaults to float("inf"). |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the metrics of the model: - num_inferences (int): The number of inferences made. - avg_inference_time (float): The average inference time. - num_errors (int): The number of errors occurred. |
Source code in inference/core/managers/metrics.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
get_system_info()
¶
Collects system information such as platform, architecture, hostname, IP address, MAC address, and processor details.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing detailed system information. |
Source code in inference/core/managers/metrics.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|