From 7303fc38ba845d54f0be078ed1101765525b4223 Mon Sep 17 00:00:00 2001 From: svalbuena <24233455+svalbuena@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:10:17 +0200 Subject: [PATCH 1/3] Fix Get trained models statistics API types --- output/typescript/types.ts | 4 ++-- specification/ml/_types/TrainedModel.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 178d11e415..4198bcb56e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14081,7 +14081,7 @@ export interface MlTrainedModelDeploymentStats { error_count: integer inference_count: integer model_id: Id - nodes: MlTrainedModelDeploymentNodesStats + nodes: MlTrainedModelDeploymentNodesStats[] number_of_allocations: integer queue_capacity: integer rejected_execution_count: integer @@ -14116,7 +14116,7 @@ export interface MlTrainedModelInferenceStats { failure_count: integer inference_count: integer missing_all_fields_count: integer - timestamp: DateTime + timestamp: long } export interface MlTrainedModelLocation { diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 2376b9fe69..745e331dfa 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -75,7 +75,7 @@ export class TrainedModelDeploymentStats { * The deployment stats for each node that currently has the model allocated. * In serverless, stats are reported for a single unnamed virtual node. */ - nodes: TrainedModelDeploymentNodesStats + nodes: TrainedModelDeploymentNodesStats[] /** The number of allocations requested. */ number_of_allocations: integer /** The number of inference requests that can be queued before new requests are rejected. */ @@ -120,7 +120,7 @@ export class TrainedModelInferenceStats { /** The number of inference calls where all the training features for the model were missing. */ missing_all_fields_count: integer /** The time when the statistics were last updated. */ - timestamp: DateTime + timestamp: long } export class TrainedModelSizeStats { From 9563caa10ca5ada71cf0e265171ef05b3cd0d75e Mon Sep 17 00:00:00 2001 From: svalbuena <24233455+svalbuena@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:16:12 +0200 Subject: [PATCH 2/3] Push schema changes --- output/schema/schema.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index e05a21c5d3..ac0c7ace8b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -153238,10 +153238,13 @@ "name": "nodes", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "TrainedModelDeploymentNodesStats", - "namespace": "ml._types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TrainedModelDeploymentNodesStats", + "namespace": "ml._types" + } } } }, @@ -153560,7 +153563,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateTime", + "name": "long", "namespace": "_types" } } From cabc6a37f6c1b694a05063a52b22e0556270b671 Mon Sep 17 00:00:00 2001 From: svalbuena <24233455+svalbuena@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:41:39 +0200 Subject: [PATCH 3/3] Use EpochTime --- output/schema/schema.json | 11 ++++++++++- output/typescript/types.ts | 2 +- specification/ml/_types/TrainedModel.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index ac0c7ace8b..23df682baf 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -153561,9 +153561,18 @@ "name": "timestamp", "required": true, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], "kind": "instance_of", "type": { - "name": "long", + "name": "EpochTime", "namespace": "_types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4198bcb56e..697aa90113 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14116,7 +14116,7 @@ export interface MlTrainedModelInferenceStats { failure_count: integer inference_count: integer missing_all_fields_count: integer - timestamp: long + timestamp: EpochTime } export interface MlTrainedModelLocation { diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 745e331dfa..d8b6249c69 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -120,7 +120,7 @@ export class TrainedModelInferenceStats { /** The number of inference calls where all the training features for the model were missing. */ missing_all_fields_count: integer /** The time when the statistics were last updated. */ - timestamp: long + timestamp: EpochTime } export class TrainedModelSizeStats {