Skip to content

Commit 4017540

Browse files
if DEVICE_ID env is set, store it in resource_details
1 parent 93a5cda commit 4017540

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

inference/usage_tracking/collector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from inference.core.env import (
2929
API_KEY,
3030
DEDICATED_DEPLOYMENT_ID,
31+
DEVICE_ID,
3132
GCP_SERVERLESS,
3233
LAMBDA,
3334
REDIS_HOST,
@@ -578,6 +579,8 @@ def _extract_usage_params_from_func_kwargs(
578579
}
579580
if DEDICATED_DEPLOYMENT_ID:
580581
resource_details["dedicated_deployment_id"] = DEDICATED_DEPLOYMENT_ID
582+
if DEVICE_ID:
583+
resource_details["device_id"] = DEVICE_ID
581584
resource_id = ""
582585
# TODO: add requires_api_key, True if workflow definition comes from platform or model comes from workspace
583586
if category == "workflows":

0 commit comments

Comments
 (0)