@mlhub/models-ts-sdk 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +1 -4
- package/README.md +2 -2
- package/dist/apis/ModelsApi.d.ts +13 -1
- package/dist/apis/ModelsApi.js +47 -0
- package/dist/models/CreateModelMetadataBody.d.ts +2 -171
- package/dist/models/CreateModelMetadataBody.js +0 -56
- package/dist/models/DiscoveryCriterion.d.ts +2 -177
- package/dist/models/DiscoveryCriterion.js +0 -58
- package/dist/models/ForkModelResponse.d.ts +51 -0
- package/dist/models/{SystemRequirement.js → ForkModelResponse.js} +15 -9
- package/dist/models/ModelMetadata.d.ts +2 -171
- package/dist/models/ModelMetadata.js +0 -56
- package/dist/models/index.d.ts +1 -4
- package/dist/models/index.js +1 -4
- package/package.json +1 -1
- package/src/apis/ModelsApi.ts +42 -0
- package/src/models/CreateModelMetadataBody.ts +1 -234
- package/src/models/DiscoveryCriterion.ts +1 -242
- package/src/models/ForkModelResponse.ts +88 -0
- package/src/models/ModelMetadata.ts +1 -234
- package/src/models/index.ts +1 -4
- package/dist/models/Accelerator.d.ts +0 -46
- package/dist/models/Accelerator.js +0 -48
- package/dist/models/HardwareRequirements.d.ts +0 -52
- package/dist/models/HardwareRequirements.js +0 -50
- package/dist/models/ModelIO.d.ts +0 -33
- package/dist/models/ModelIO.js +0 -43
- package/dist/models/SystemRequirement.d.ts +0 -33
- package/src/models/Accelerator.ts +0 -87
- package/src/models/HardwareRequirements.ts +0 -95
- package/src/models/ModelIO.ts +0 -64
- package/src/models/SystemRequirement.ts +0 -64
|
@@ -26,43 +26,14 @@ function DiscoveryCriterionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
'annotations': !(0, runtime_1.exists)(json, 'annotations') ? undefined : json['annotations'],
|
|
30
29
|
'author': !(0, runtime_1.exists)(json, 'author') ? undefined : json['author'],
|
|
31
|
-
'bias_evaluation_score': !(0, runtime_1.exists)(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
32
|
-
'edge_optimized': !(0, runtime_1.exists)(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
33
|
-
'finetuning_datasets': !(0, runtime_1.exists)(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
34
|
-
'image': !(0, runtime_1.exists)(json, 'image') ? undefined : json['image'],
|
|
35
|
-
'inference_distributed': !(0, runtime_1.exists)(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
36
|
-
'inference_hardware': !(0, runtime_1.exists)(json, 'inference_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['inference_hardware']),
|
|
37
|
-
'inference_max_compute_utilization_percentage': !(0, runtime_1.exists)(json, 'inference_max_compute_utilization_percentage') ? undefined : json['inference_max_compute_utilization_percentage'],
|
|
38
|
-
'inference_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'inference_max_energy_consumption_watts') ? undefined : json['inference_max_energy_consumption_watts'],
|
|
39
|
-
'inference_max_latency_ms': !(0, runtime_1.exists)(json, 'inference_max_latency_ms') ? undefined : json['inference_max_latency_ms'],
|
|
40
|
-
'inference_max_memory_usage_mb': !(0, runtime_1.exists)(json, 'inference_max_memory_usage_mb') ? undefined : json['inference_max_memory_usage_mb'],
|
|
41
|
-
'inference_min_throughput': !(0, runtime_1.exists)(json, 'inference_min_throughput') ? undefined : json['inference_min_throughput'],
|
|
42
|
-
'inference_precision': !(0, runtime_1.exists)(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
43
|
-
'inference_software_dependencies': !(0, runtime_1.exists)(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
44
30
|
'libraries': !(0, runtime_1.exists)(json, 'libraries') ? undefined : json['libraries'],
|
|
45
31
|
'license': !(0, runtime_1.exists)(json, 'license') ? undefined : json['license'],
|
|
46
|
-
'model_inputs': !(0, runtime_1.exists)(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : json['model_inputs'].map(_1.ModelIOFromJSON)),
|
|
47
|
-
'model_outputs': !(0, runtime_1.exists)(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : json['model_outputs'].map(_1.ModelIOFromJSON)),
|
|
48
32
|
'model_type': !(0, runtime_1.exists)(json, 'model_type') ? undefined : json['model_type'],
|
|
49
|
-
'multi_modal': !(0, runtime_1.exists)(json, 'multi_modal') ? undefined : json['multi_modal'],
|
|
50
33
|
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
51
|
-
'pretrained': !(0, runtime_1.exists)(json, 'pretrained') ? undefined : json['pretrained'],
|
|
52
|
-
'pretraining_datasets': !(0, runtime_1.exists)(json, 'pretraining_datasets') ? undefined : json['pretraining_datasets'],
|
|
53
|
-
'pruned': !(0, runtime_1.exists)(json, 'pruned') ? undefined : json['pruned'],
|
|
54
|
-
'quantization_aware': !(0, runtime_1.exists)(json, 'quantization_aware') ? undefined : json['quantization_aware'],
|
|
55
34
|
'regulatory': !(0, runtime_1.exists)(json, 'regulatory') ? undefined : json['regulatory'],
|
|
56
|
-
'slimmed': !(0, runtime_1.exists)(json, 'slimmed') ? undefined : json['slimmed'],
|
|
57
|
-
'supports_quantization': !(0, runtime_1.exists)(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
58
35
|
'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
|
|
59
36
|
'task_types': !(0, runtime_1.exists)(json, 'task_types') ? undefined : (json['task_types'] === null ? null : json['task_types'].map(_1.TaskFromJSON)),
|
|
60
|
-
'training_distributed': !(0, runtime_1.exists)(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
61
|
-
'training_hardware': !(0, runtime_1.exists)(json, 'training_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['training_hardware']),
|
|
62
|
-
'training_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
63
|
-
'training_precision': !(0, runtime_1.exists)(json, 'training_precision') ? undefined : json['training_precision'],
|
|
64
|
-
'training_time': !(0, runtime_1.exists)(json, 'training_time') ? undefined : json['training_time'],
|
|
65
|
-
'version': !(0, runtime_1.exists)(json, 'version') ? undefined : json['version'],
|
|
66
37
|
};
|
|
67
38
|
}
|
|
68
39
|
function DiscoveryCriterionToJSON(value) {
|
|
@@ -73,42 +44,13 @@ function DiscoveryCriterionToJSON(value) {
|
|
|
73
44
|
return null;
|
|
74
45
|
}
|
|
75
46
|
return {
|
|
76
|
-
'annotations': value.annotations,
|
|
77
47
|
'author': value.author,
|
|
78
|
-
'bias_evaluation_score': value.bias_evaluation_score,
|
|
79
|
-
'edge_optimized': value.edge_optimized,
|
|
80
|
-
'finetuning_datasets': value.finetuning_datasets,
|
|
81
|
-
'image': value.image,
|
|
82
|
-
'inference_distributed': value.inference_distributed,
|
|
83
|
-
'inference_hardware': (0, _1.HardwareRequirementsToJSON)(value.inference_hardware),
|
|
84
|
-
'inference_max_compute_utilization_percentage': value.inference_max_compute_utilization_percentage,
|
|
85
|
-
'inference_max_energy_consumption_watts': value.inference_max_energy_consumption_watts,
|
|
86
|
-
'inference_max_latency_ms': value.inference_max_latency_ms,
|
|
87
|
-
'inference_max_memory_usage_mb': value.inference_max_memory_usage_mb,
|
|
88
|
-
'inference_min_throughput': value.inference_min_throughput,
|
|
89
|
-
'inference_precision': value.inference_precision,
|
|
90
|
-
'inference_software_dependencies': value.inference_software_dependencies,
|
|
91
48
|
'libraries': value.libraries,
|
|
92
49
|
'license': value.license,
|
|
93
|
-
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : value.model_inputs.map(_1.ModelIOToJSON)),
|
|
94
|
-
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : value.model_outputs.map(_1.ModelIOToJSON)),
|
|
95
50
|
'model_type': value.model_type,
|
|
96
|
-
'multi_modal': value.multi_modal,
|
|
97
51
|
'name': value.name,
|
|
98
|
-
'pretrained': value.pretrained,
|
|
99
|
-
'pretraining_datasets': value.pretraining_datasets,
|
|
100
|
-
'pruned': value.pruned,
|
|
101
|
-
'quantization_aware': value.quantization_aware,
|
|
102
52
|
'regulatory': value.regulatory,
|
|
103
|
-
'slimmed': value.slimmed,
|
|
104
|
-
'supports_quantization': value.supports_quantization,
|
|
105
53
|
'tags': value.tags,
|
|
106
54
|
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : value.task_types.map(_1.TaskToJSON)),
|
|
107
|
-
'training_distributed': value.training_distributed,
|
|
108
|
-
'training_hardware': (0, _1.HardwareRequirementsToJSON)(value.training_hardware),
|
|
109
|
-
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
|
110
|
-
'training_precision': value.training_precision,
|
|
111
|
-
'training_time': value.training_time,
|
|
112
|
-
'version': value.version,
|
|
113
55
|
};
|
|
114
56
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLHub Models API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ForkModelResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface ForkModelResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ForkModelResponse
|
|
22
|
+
*/
|
|
23
|
+
message: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {object}
|
|
27
|
+
* @memberof ForkModelResponse
|
|
28
|
+
*/
|
|
29
|
+
metadata: object;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {any}
|
|
33
|
+
* @memberof ForkModelResponse
|
|
34
|
+
*/
|
|
35
|
+
result: any | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ForkModelResponse
|
|
40
|
+
*/
|
|
41
|
+
status: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ForkModelResponse
|
|
46
|
+
*/
|
|
47
|
+
version: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function ForkModelResponseFromJSON(json: any): ForkModelResponse;
|
|
50
|
+
export declare function ForkModelResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ForkModelResponse;
|
|
51
|
+
export declare function ForkModelResponseToJSON(value?: ForkModelResponse | null): any;
|
|
@@ -13,22 +13,25 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
function
|
|
20
|
-
return
|
|
16
|
+
exports.ForkModelResponseFromJSON = ForkModelResponseFromJSON;
|
|
17
|
+
exports.ForkModelResponseFromJSONTyped = ForkModelResponseFromJSONTyped;
|
|
18
|
+
exports.ForkModelResponseToJSON = ForkModelResponseToJSON;
|
|
19
|
+
function ForkModelResponseFromJSON(json) {
|
|
20
|
+
return ForkModelResponseFromJSONTyped(json, false);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ForkModelResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
23
|
if ((json === undefined) || (json === null)) {
|
|
24
24
|
return json;
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
'
|
|
27
|
+
'message': json['message'],
|
|
28
|
+
'metadata': json['metadata'],
|
|
29
|
+
'result': json['result'],
|
|
30
|
+
'status': json['status'],
|
|
28
31
|
'version': json['version'],
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
|
-
function
|
|
34
|
+
function ForkModelResponseToJSON(value) {
|
|
32
35
|
if (value === undefined) {
|
|
33
36
|
return undefined;
|
|
34
37
|
}
|
|
@@ -36,7 +39,10 @@ function SystemRequirementToJSON(value) {
|
|
|
36
39
|
return null;
|
|
37
40
|
}
|
|
38
41
|
return {
|
|
39
|
-
'
|
|
42
|
+
'message': value.message,
|
|
43
|
+
'metadata': value.metadata,
|
|
44
|
+
'result': value.result,
|
|
45
|
+
'status': value.status,
|
|
40
46
|
'version': value.version,
|
|
41
47
|
};
|
|
42
48
|
}
|
|
@@ -9,31 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Canonical, DeploymentStrategyReference,
|
|
12
|
+
import { Canonical, DeploymentStrategyReference, Task } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
16
16
|
* @interface ModelMetadata
|
|
17
17
|
*/
|
|
18
18
|
export interface ModelMetadata {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {any}
|
|
22
|
-
* @memberof ModelMetadata
|
|
23
|
-
*/
|
|
24
|
-
annotations?: any | null;
|
|
25
19
|
/**
|
|
26
20
|
*
|
|
27
21
|
* @type {string}
|
|
28
22
|
* @memberof ModelMetadata
|
|
29
23
|
*/
|
|
30
24
|
author: string;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {number}
|
|
34
|
-
* @memberof ModelMetadata
|
|
35
|
-
*/
|
|
36
|
-
bias_evaluation_score?: number | null;
|
|
37
25
|
/**
|
|
38
26
|
*
|
|
39
27
|
* @type {Canonical}
|
|
@@ -52,78 +40,6 @@ export interface ModelMetadata {
|
|
|
52
40
|
* @memberof ModelMetadata
|
|
53
41
|
*/
|
|
54
42
|
description?: string | null;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {boolean}
|
|
58
|
-
* @memberof ModelMetadata
|
|
59
|
-
*/
|
|
60
|
-
edge_optimized?: boolean | null;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {Array<string>}
|
|
64
|
-
* @memberof ModelMetadata
|
|
65
|
-
*/
|
|
66
|
-
finetuning_datasets?: Array<string> | null;
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* @type {string}
|
|
70
|
-
* @memberof ModelMetadata
|
|
71
|
-
*/
|
|
72
|
-
image?: string | null;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @type {boolean}
|
|
76
|
-
* @memberof ModelMetadata
|
|
77
|
-
*/
|
|
78
|
-
inference_distributed?: boolean | null;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @type {HardwareRequirements}
|
|
82
|
-
* @memberof ModelMetadata
|
|
83
|
-
*/
|
|
84
|
-
inference_hardware?: HardwareRequirements;
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @type {number}
|
|
88
|
-
* @memberof ModelMetadata
|
|
89
|
-
*/
|
|
90
|
-
inference_max_compute_utilization_percentage?: number | null;
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
* @type {number}
|
|
94
|
-
* @memberof ModelMetadata
|
|
95
|
-
*/
|
|
96
|
-
inference_max_energy_consumption_watts?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* Inference performance fields
|
|
99
|
-
* @type {number}
|
|
100
|
-
* @memberof ModelMetadata
|
|
101
|
-
*/
|
|
102
|
-
inference_max_latency_ms?: number | null;
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* @type {number}
|
|
106
|
-
* @memberof ModelMetadata
|
|
107
|
-
*/
|
|
108
|
-
inference_max_memory_usage_mb?: number | null;
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @type {number}
|
|
112
|
-
* @memberof ModelMetadata
|
|
113
|
-
*/
|
|
114
|
-
inference_min_throughput?: number | null;
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* @type {string}
|
|
118
|
-
* @memberof ModelMetadata
|
|
119
|
-
*/
|
|
120
|
-
inference_precision?: string | null;
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
* @type {Array<string>}
|
|
124
|
-
* @memberof ModelMetadata
|
|
125
|
-
*/
|
|
126
|
-
inference_software_dependencies?: Array<string> | null;
|
|
127
43
|
/**
|
|
128
44
|
*
|
|
129
45
|
* @type {Array<string>}
|
|
@@ -136,30 +52,12 @@ export interface ModelMetadata {
|
|
|
136
52
|
* @memberof ModelMetadata
|
|
137
53
|
*/
|
|
138
54
|
license?: string | null;
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
* @type {Array<ModelIO>}
|
|
142
|
-
* @memberof ModelMetadata
|
|
143
|
-
*/
|
|
144
|
-
model_inputs?: Array<ModelIO> | null;
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
147
|
-
* @type {Array<ModelIO>}
|
|
148
|
-
* @memberof ModelMetadata
|
|
149
|
-
*/
|
|
150
|
-
model_outputs?: Array<ModelIO> | null;
|
|
151
55
|
/**
|
|
152
56
|
*
|
|
153
57
|
* @type {string}
|
|
154
58
|
* @memberof ModelMetadata
|
|
155
59
|
*/
|
|
156
60
|
model_type?: string | null;
|
|
157
|
-
/**
|
|
158
|
-
* Architecture fields
|
|
159
|
-
* @type {boolean}
|
|
160
|
-
* @memberof ModelMetadata
|
|
161
|
-
*/
|
|
162
|
-
multi_modal?: boolean | null;
|
|
163
61
|
/**
|
|
164
62
|
*
|
|
165
63
|
* @type {string}
|
|
@@ -168,55 +66,18 @@ export interface ModelMetadata {
|
|
|
168
66
|
name: string;
|
|
169
67
|
/**
|
|
170
68
|
*
|
|
171
|
-
* @type {boolean}
|
|
172
|
-
* @memberof ModelMetadata
|
|
173
|
-
*/
|
|
174
|
-
pretrained?: boolean | null;
|
|
175
|
-
/**
|
|
176
|
-
*
|
|
177
|
-
* @type {Array<string>}
|
|
178
|
-
* @memberof ModelMetadata
|
|
179
|
-
*/
|
|
180
|
-
pretraining_datasets?: Array<string> | null;
|
|
181
|
-
/**
|
|
182
|
-
*
|
|
183
|
-
* @type {boolean}
|
|
184
|
-
* @memberof ModelMetadata
|
|
185
|
-
*/
|
|
186
|
-
pruned?: boolean | null;
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
* @type {boolean}
|
|
190
|
-
* @memberof ModelMetadata
|
|
191
|
-
*/
|
|
192
|
-
quantization_aware?: boolean | null;
|
|
193
|
-
/**
|
|
194
|
-
* Regulatory and Compliance Fields
|
|
195
|
-
* A vector or strings that represent regulatory standards. Ex HIPPA
|
|
196
69
|
* @type {Array<string>}
|
|
197
70
|
* @memberof ModelMetadata
|
|
198
71
|
*/
|
|
199
72
|
regulatory?: Array<string> | null;
|
|
200
73
|
/**
|
|
201
74
|
*
|
|
202
|
-
* @type {boolean}
|
|
203
|
-
* @memberof ModelMetadata
|
|
204
|
-
*/
|
|
205
|
-
slimmed?: boolean | null;
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
|
-
* @type {boolean}
|
|
209
|
-
* @memberof ModelMetadata
|
|
210
|
-
*/
|
|
211
|
-
supports_quantization?: boolean | null;
|
|
212
|
-
/**
|
|
213
|
-
* Arbitrary labels
|
|
214
75
|
* @type {Array<string>}
|
|
215
76
|
* @memberof ModelMetadata
|
|
216
77
|
*/
|
|
217
78
|
tags?: Array<string> | null;
|
|
218
79
|
/**
|
|
219
|
-
*
|
|
80
|
+
*
|
|
220
81
|
* @type {Array<Task>}
|
|
221
82
|
* @memberof ModelMetadata
|
|
222
83
|
*/
|
|
@@ -227,36 +88,6 @@ export interface ModelMetadata {
|
|
|
227
88
|
* @memberof ModelMetadata
|
|
228
89
|
*/
|
|
229
90
|
tenant_id: string;
|
|
230
|
-
/**
|
|
231
|
-
*
|
|
232
|
-
* @type {boolean}
|
|
233
|
-
* @memberof ModelMetadata
|
|
234
|
-
*/
|
|
235
|
-
training_distributed?: boolean | null;
|
|
236
|
-
/**
|
|
237
|
-
*
|
|
238
|
-
* @type {HardwareRequirements}
|
|
239
|
-
* @memberof ModelMetadata
|
|
240
|
-
*/
|
|
241
|
-
training_hardware?: HardwareRequirements;
|
|
242
|
-
/**
|
|
243
|
-
* Training performance fields
|
|
244
|
-
* @type {number}
|
|
245
|
-
* @memberof ModelMetadata
|
|
246
|
-
*/
|
|
247
|
-
training_max_energy_consumption_watts?: number | null;
|
|
248
|
-
/**
|
|
249
|
-
*
|
|
250
|
-
* @type {string}
|
|
251
|
-
* @memberof ModelMetadata
|
|
252
|
-
*/
|
|
253
|
-
training_precision?: string | null;
|
|
254
|
-
/**
|
|
255
|
-
* Training-related Fields
|
|
256
|
-
* @type {number}
|
|
257
|
-
* @memberof ModelMetadata
|
|
258
|
-
*/
|
|
259
|
-
training_time?: number | null;
|
|
260
91
|
}
|
|
261
92
|
export declare function ModelMetadataFromJSON(json: any): ModelMetadata;
|
|
262
93
|
export declare function ModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelMetadata;
|
|
@@ -26,46 +26,18 @@ function ModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
'annotations': !(0, runtime_1.exists)(json, 'annotations') ? undefined : json['annotations'],
|
|
30
29
|
'author': json['author'],
|
|
31
|
-
'bias_evaluation_score': !(0, runtime_1.exists)(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
32
30
|
'canonical': !(0, runtime_1.exists)(json, 'canonical') ? undefined : (0, _1.CanonicalFromJSON)(json['canonical']),
|
|
33
31
|
'deployment_strategy_refs': (json['deployment_strategy_refs'].map(_1.DeploymentStrategyReferenceFromJSON)),
|
|
34
32
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
35
|
-
'edge_optimized': !(0, runtime_1.exists)(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
36
|
-
'finetuning_datasets': !(0, runtime_1.exists)(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
37
|
-
'image': !(0, runtime_1.exists)(json, 'image') ? undefined : json['image'],
|
|
38
|
-
'inference_distributed': !(0, runtime_1.exists)(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
39
|
-
'inference_hardware': !(0, runtime_1.exists)(json, 'inference_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['inference_hardware']),
|
|
40
|
-
'inference_max_compute_utilization_percentage': !(0, runtime_1.exists)(json, 'inference_max_compute_utilization_percentage') ? undefined : json['inference_max_compute_utilization_percentage'],
|
|
41
|
-
'inference_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'inference_max_energy_consumption_watts') ? undefined : json['inference_max_energy_consumption_watts'],
|
|
42
|
-
'inference_max_latency_ms': !(0, runtime_1.exists)(json, 'inference_max_latency_ms') ? undefined : json['inference_max_latency_ms'],
|
|
43
|
-
'inference_max_memory_usage_mb': !(0, runtime_1.exists)(json, 'inference_max_memory_usage_mb') ? undefined : json['inference_max_memory_usage_mb'],
|
|
44
|
-
'inference_min_throughput': !(0, runtime_1.exists)(json, 'inference_min_throughput') ? undefined : json['inference_min_throughput'],
|
|
45
|
-
'inference_precision': !(0, runtime_1.exists)(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
46
|
-
'inference_software_dependencies': !(0, runtime_1.exists)(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
47
33
|
'libraries': !(0, runtime_1.exists)(json, 'libraries') ? undefined : json['libraries'],
|
|
48
34
|
'license': !(0, runtime_1.exists)(json, 'license') ? undefined : json['license'],
|
|
49
|
-
'model_inputs': !(0, runtime_1.exists)(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : json['model_inputs'].map(_1.ModelIOFromJSON)),
|
|
50
|
-
'model_outputs': !(0, runtime_1.exists)(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : json['model_outputs'].map(_1.ModelIOFromJSON)),
|
|
51
35
|
'model_type': !(0, runtime_1.exists)(json, 'model_type') ? undefined : json['model_type'],
|
|
52
|
-
'multi_modal': !(0, runtime_1.exists)(json, 'multi_modal') ? undefined : json['multi_modal'],
|
|
53
36
|
'name': json['name'],
|
|
54
|
-
'pretrained': !(0, runtime_1.exists)(json, 'pretrained') ? undefined : json['pretrained'],
|
|
55
|
-
'pretraining_datasets': !(0, runtime_1.exists)(json, 'pretraining_datasets') ? undefined : json['pretraining_datasets'],
|
|
56
|
-
'pruned': !(0, runtime_1.exists)(json, 'pruned') ? undefined : json['pruned'],
|
|
57
|
-
'quantization_aware': !(0, runtime_1.exists)(json, 'quantization_aware') ? undefined : json['quantization_aware'],
|
|
58
37
|
'regulatory': !(0, runtime_1.exists)(json, 'regulatory') ? undefined : json['regulatory'],
|
|
59
|
-
'slimmed': !(0, runtime_1.exists)(json, 'slimmed') ? undefined : json['slimmed'],
|
|
60
|
-
'supports_quantization': !(0, runtime_1.exists)(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
61
38
|
'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
|
|
62
39
|
'task_types': !(0, runtime_1.exists)(json, 'task_types') ? undefined : (json['task_types'] === null ? null : json['task_types'].map(_1.TaskFromJSON)),
|
|
63
40
|
'tenant_id': json['tenant_id'],
|
|
64
|
-
'training_distributed': !(0, runtime_1.exists)(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
65
|
-
'training_hardware': !(0, runtime_1.exists)(json, 'training_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['training_hardware']),
|
|
66
|
-
'training_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
67
|
-
'training_precision': !(0, runtime_1.exists)(json, 'training_precision') ? undefined : json['training_precision'],
|
|
68
|
-
'training_time': !(0, runtime_1.exists)(json, 'training_time') ? undefined : json['training_time'],
|
|
69
41
|
};
|
|
70
42
|
}
|
|
71
43
|
function ModelMetadataToJSON(value) {
|
|
@@ -76,45 +48,17 @@ function ModelMetadataToJSON(value) {
|
|
|
76
48
|
return null;
|
|
77
49
|
}
|
|
78
50
|
return {
|
|
79
|
-
'annotations': value.annotations,
|
|
80
51
|
'author': value.author,
|
|
81
|
-
'bias_evaluation_score': value.bias_evaluation_score,
|
|
82
52
|
'canonical': (0, _1.CanonicalToJSON)(value.canonical),
|
|
83
53
|
'deployment_strategy_refs': (value.deployment_strategy_refs.map(_1.DeploymentStrategyReferenceToJSON)),
|
|
84
54
|
'description': value.description,
|
|
85
|
-
'edge_optimized': value.edge_optimized,
|
|
86
|
-
'finetuning_datasets': value.finetuning_datasets,
|
|
87
|
-
'image': value.image,
|
|
88
|
-
'inference_distributed': value.inference_distributed,
|
|
89
|
-
'inference_hardware': (0, _1.HardwareRequirementsToJSON)(value.inference_hardware),
|
|
90
|
-
'inference_max_compute_utilization_percentage': value.inference_max_compute_utilization_percentage,
|
|
91
|
-
'inference_max_energy_consumption_watts': value.inference_max_energy_consumption_watts,
|
|
92
|
-
'inference_max_latency_ms': value.inference_max_latency_ms,
|
|
93
|
-
'inference_max_memory_usage_mb': value.inference_max_memory_usage_mb,
|
|
94
|
-
'inference_min_throughput': value.inference_min_throughput,
|
|
95
|
-
'inference_precision': value.inference_precision,
|
|
96
|
-
'inference_software_dependencies': value.inference_software_dependencies,
|
|
97
55
|
'libraries': value.libraries,
|
|
98
56
|
'license': value.license,
|
|
99
|
-
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : value.model_inputs.map(_1.ModelIOToJSON)),
|
|
100
|
-
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : value.model_outputs.map(_1.ModelIOToJSON)),
|
|
101
57
|
'model_type': value.model_type,
|
|
102
|
-
'multi_modal': value.multi_modal,
|
|
103
58
|
'name': value.name,
|
|
104
|
-
'pretrained': value.pretrained,
|
|
105
|
-
'pretraining_datasets': value.pretraining_datasets,
|
|
106
|
-
'pruned': value.pruned,
|
|
107
|
-
'quantization_aware': value.quantization_aware,
|
|
108
59
|
'regulatory': value.regulatory,
|
|
109
|
-
'slimmed': value.slimmed,
|
|
110
|
-
'supports_quantization': value.supports_quantization,
|
|
111
60
|
'tags': value.tags,
|
|
112
61
|
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : value.task_types.map(_1.TaskToJSON)),
|
|
113
62
|
'tenant_id': value.tenant_id,
|
|
114
|
-
'training_distributed': value.training_distributed,
|
|
115
|
-
'training_hardware': (0, _1.HardwareRequirementsToJSON)(value.training_hardware),
|
|
116
|
-
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
|
117
|
-
'training_precision': value.training_precision,
|
|
118
|
-
'training_time': value.training_time,
|
|
119
63
|
};
|
|
120
64
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './Accelerator';
|
|
2
1
|
export * from './Artifact';
|
|
3
2
|
export * from './ArtifactIngestion';
|
|
4
3
|
export * from './ArtifactIngestionStatus';
|
|
@@ -16,12 +15,12 @@ export * from './DiscoverModelsByPlatformResponse';
|
|
|
16
15
|
export * from './DiscoverModelsResponse';
|
|
17
16
|
export * from './DiscoveryCriteria';
|
|
18
17
|
export * from './DiscoveryCriterion';
|
|
18
|
+
export * from './ForkModelResponse';
|
|
19
19
|
export * from './GetModelArtifactResponse';
|
|
20
20
|
export * from './GetModelByPlatformResponse';
|
|
21
21
|
export * from './GetModelIngestionResponse';
|
|
22
22
|
export * from './GetModelPublicationResponse';
|
|
23
23
|
export * from './GetModelResponse';
|
|
24
|
-
export * from './HardwareRequirements';
|
|
25
24
|
export * from './IngestArtifactRequest';
|
|
26
25
|
export * from './IngestModelArtifactResponse';
|
|
27
26
|
export * from './ListModelArtifactResponse';
|
|
@@ -34,7 +33,6 @@ export * from './ListPlatformsResponse';
|
|
|
34
33
|
export * from './ListTasksResponse';
|
|
35
34
|
export * from './Locator';
|
|
36
35
|
export * from './ModelArtifact';
|
|
37
|
-
export * from './ModelIO';
|
|
38
36
|
export * from './ModelMetadata';
|
|
39
37
|
export * from './NotFoundResponse';
|
|
40
38
|
export * from './Platform';
|
|
@@ -42,5 +40,4 @@ export * from './PlatformDetails';
|
|
|
42
40
|
export * from './PublishArtifactRequest';
|
|
43
41
|
export * from './PublishModelArtifactResponse';
|
|
44
42
|
export * from './ServerErrorResponse';
|
|
45
|
-
export * from './SystemRequirement';
|
|
46
43
|
export * from './Task';
|
package/dist/models/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./Accelerator"), exports);
|
|
20
19
|
__exportStar(require("./Artifact"), exports);
|
|
21
20
|
__exportStar(require("./ArtifactIngestion"), exports);
|
|
22
21
|
__exportStar(require("./ArtifactIngestionStatus"), exports);
|
|
@@ -34,12 +33,12 @@ __exportStar(require("./DiscoverModelsByPlatformResponse"), exports);
|
|
|
34
33
|
__exportStar(require("./DiscoverModelsResponse"), exports);
|
|
35
34
|
__exportStar(require("./DiscoveryCriteria"), exports);
|
|
36
35
|
__exportStar(require("./DiscoveryCriterion"), exports);
|
|
36
|
+
__exportStar(require("./ForkModelResponse"), exports);
|
|
37
37
|
__exportStar(require("./GetModelArtifactResponse"), exports);
|
|
38
38
|
__exportStar(require("./GetModelByPlatformResponse"), exports);
|
|
39
39
|
__exportStar(require("./GetModelIngestionResponse"), exports);
|
|
40
40
|
__exportStar(require("./GetModelPublicationResponse"), exports);
|
|
41
41
|
__exportStar(require("./GetModelResponse"), exports);
|
|
42
|
-
__exportStar(require("./HardwareRequirements"), exports);
|
|
43
42
|
__exportStar(require("./IngestArtifactRequest"), exports);
|
|
44
43
|
__exportStar(require("./IngestModelArtifactResponse"), exports);
|
|
45
44
|
__exportStar(require("./ListModelArtifactResponse"), exports);
|
|
@@ -52,7 +51,6 @@ __exportStar(require("./ListPlatformsResponse"), exports);
|
|
|
52
51
|
__exportStar(require("./ListTasksResponse"), exports);
|
|
53
52
|
__exportStar(require("./Locator"), exports);
|
|
54
53
|
__exportStar(require("./ModelArtifact"), exports);
|
|
55
|
-
__exportStar(require("./ModelIO"), exports);
|
|
56
54
|
__exportStar(require("./ModelMetadata"), exports);
|
|
57
55
|
__exportStar(require("./NotFoundResponse"), exports);
|
|
58
56
|
__exportStar(require("./Platform"), exports);
|
|
@@ -60,5 +58,4 @@ __exportStar(require("./PlatformDetails"), exports);
|
|
|
60
58
|
__exportStar(require("./PublishArtifactRequest"), exports);
|
|
61
59
|
__exportStar(require("./PublishModelArtifactResponse"), exports);
|
|
62
60
|
__exportStar(require("./ServerErrorResponse"), exports);
|
|
63
|
-
__exportStar(require("./SystemRequirement"), exports);
|
|
64
61
|
__exportStar(require("./Task"), exports);
|
package/package.json
CHANGED
package/src/apis/ModelsApi.ts
CHANGED
|
@@ -30,6 +30,9 @@ import {
|
|
|
30
30
|
DiscoveryCriteria,
|
|
31
31
|
DiscoveryCriteriaFromJSON,
|
|
32
32
|
DiscoveryCriteriaToJSON,
|
|
33
|
+
ForkModelResponse,
|
|
34
|
+
ForkModelResponseFromJSON,
|
|
35
|
+
ForkModelResponseToJSON,
|
|
33
36
|
GetModelResponse,
|
|
34
37
|
GetModelResponseFromJSON,
|
|
35
38
|
GetModelResponseToJSON,
|
|
@@ -62,6 +65,11 @@ export interface DiscoverModelsRequest {
|
|
|
62
65
|
includeGlobalModels?: boolean;
|
|
63
66
|
}
|
|
64
67
|
|
|
68
|
+
export interface ForkModelRequest {
|
|
69
|
+
author: string;
|
|
70
|
+
name: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
export interface GetModelByAuthorAndNameRequest {
|
|
66
74
|
name: string;
|
|
67
75
|
author: string;
|
|
@@ -165,6 +173,40 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
165
173
|
return await response.value();
|
|
166
174
|
}
|
|
167
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Fork model metadata from a platform
|
|
178
|
+
*/
|
|
179
|
+
async forkModelRaw(requestParameters: ForkModelRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ForkModelResponse>> {
|
|
180
|
+
if (requestParameters.author === null || requestParameters.author === undefined) {
|
|
181
|
+
throw new runtime.RequiredError('author','Required parameter requestParameters.author was null or undefined when calling forkModel.');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
185
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling forkModel.');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const queryParameters: any = {};
|
|
189
|
+
|
|
190
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
191
|
+
|
|
192
|
+
const response = await this.request({
|
|
193
|
+
path: `/models-api/models/fork/{author}/{name}`.replace(`{${"author"}}`, encodeURIComponent(String(requestParameters.author))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
194
|
+
method: 'POST',
|
|
195
|
+
headers: headerParameters,
|
|
196
|
+
query: queryParameters,
|
|
197
|
+
}, initOverrides);
|
|
198
|
+
|
|
199
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ForkModelResponseFromJSON(jsonValue));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Fork model metadata from a platform
|
|
204
|
+
*/
|
|
205
|
+
async forkModel(requestParameters: ForkModelRequest, initOverrides?: RequestInit): Promise<ForkModelResponse> {
|
|
206
|
+
const response = await this.forkModelRaw(requestParameters, initOverrides);
|
|
207
|
+
return await response.value();
|
|
208
|
+
}
|
|
209
|
+
|
|
168
210
|
/**
|
|
169
211
|
* Get model by the author and name
|
|
170
212
|
*/
|