@mlhub/models-ts-sdk 0.1.1 → 0.3.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 +4 -1
- package/README.md +2 -2
- package/dist/apis/ArtifactsApi.d.ts +2 -2
- package/dist/apis/ArtifactsApi.js +3 -3
- package/dist/apis/ModelsApi.d.ts +17 -11
- package/dist/apis/ModelsApi.js +27 -20
- package/dist/models/AssociateModelMetadataBody.d.ts +33 -0
- package/dist/models/{AssociateModelMetadata.js → AssociateModelMetadataBody.js} +7 -7
- package/dist/models/Canonical.d.ts +76 -0
- package/dist/models/Canonical.js +58 -0
- package/dist/models/CreateModelMetadataBody.d.ts +245 -0
- package/dist/models/CreateModelMetadataBody.js +114 -0
- package/dist/models/DiscoveryCriteria.d.ts +0 -6
- package/dist/models/DiscoveryCriteria.js +0 -2
- package/dist/models/Locator.d.ts +27 -0
- package/dist/models/Locator.js +40 -0
- package/dist/models/ModelMetadata.d.ts +13 -1
- package/dist/models/ModelMetadata.js +4 -0
- package/dist/models/index.d.ts +4 -1
- package/dist/models/index.js +4 -1
- package/package.json +1 -1
- package/src/apis/ArtifactsApi.ts +7 -7
- package/src/apis/ModelsApi.ts +34 -31
- package/src/models/{AssociateModelMetadata.ts → AssociateModelMetadataBody.ts} +8 -8
- package/src/models/Canonical.ts +131 -0
- package/src/models/CreateModelMetadataBody.ts +360 -0
- package/src/models/DiscoveryCriteria.ts +0 -8
- package/src/models/Locator.ts +56 -0
- package/src/models/ModelMetadata.ts +20 -0
- package/src/models/index.ts +4 -1
- package/dist/models/AssociateModelMetadata.d.ts +0 -33
|
@@ -0,0 +1,245 @@
|
|
|
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
|
+
import { HardwareRequirements, ModelIO, Task } from './';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CreateModelMetadataBody
|
|
17
|
+
*/
|
|
18
|
+
export interface CreateModelMetadataBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {any}
|
|
22
|
+
* @memberof CreateModelMetadataBody
|
|
23
|
+
*/
|
|
24
|
+
annotations?: any | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CreateModelMetadataBody
|
|
29
|
+
*/
|
|
30
|
+
author?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof CreateModelMetadataBody
|
|
35
|
+
*/
|
|
36
|
+
bias_evaluation_score?: number | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof CreateModelMetadataBody
|
|
41
|
+
*/
|
|
42
|
+
edge_optimized?: boolean | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<string>}
|
|
46
|
+
* @memberof CreateModelMetadataBody
|
|
47
|
+
*/
|
|
48
|
+
finetuning_datasets?: Array<string> | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CreateModelMetadataBody
|
|
53
|
+
*/
|
|
54
|
+
image?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof CreateModelMetadataBody
|
|
59
|
+
*/
|
|
60
|
+
inference_distributed?: boolean | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {HardwareRequirements}
|
|
64
|
+
* @memberof CreateModelMetadataBody
|
|
65
|
+
*/
|
|
66
|
+
inference_hardware?: HardwareRequirements;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof CreateModelMetadataBody
|
|
71
|
+
*/
|
|
72
|
+
inference_max_compute_utilization_percentage?: number | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof CreateModelMetadataBody
|
|
77
|
+
*/
|
|
78
|
+
inference_max_energy_consumption_watts?: number | null;
|
|
79
|
+
/**
|
|
80
|
+
* Inference performance fields
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof CreateModelMetadataBody
|
|
83
|
+
*/
|
|
84
|
+
inference_max_latency_ms?: number | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof CreateModelMetadataBody
|
|
89
|
+
*/
|
|
90
|
+
inference_max_memory_usage_mb?: number | null;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof CreateModelMetadataBody
|
|
95
|
+
*/
|
|
96
|
+
inference_min_throughput?: number | null;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof CreateModelMetadataBody
|
|
101
|
+
*/
|
|
102
|
+
inference_precision?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {Array<string>}
|
|
106
|
+
* @memberof CreateModelMetadataBody
|
|
107
|
+
*/
|
|
108
|
+
inference_software_dependencies?: Array<string> | null;
|
|
109
|
+
/**
|
|
110
|
+
* Arbitrary labels
|
|
111
|
+
* @type {Array<string>}
|
|
112
|
+
* @memberof CreateModelMetadataBody
|
|
113
|
+
*/
|
|
114
|
+
keywords?: Array<string> | null;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {Array<string>}
|
|
118
|
+
* @memberof CreateModelMetadataBody
|
|
119
|
+
*/
|
|
120
|
+
libraries?: Array<string> | null;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @type {string}
|
|
124
|
+
* @memberof CreateModelMetadataBody
|
|
125
|
+
*/
|
|
126
|
+
license?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @type {Array<ModelIO>}
|
|
130
|
+
* @memberof CreateModelMetadataBody
|
|
131
|
+
*/
|
|
132
|
+
model_inputs?: Array<ModelIO> | null;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {Array<ModelIO>}
|
|
136
|
+
* @memberof CreateModelMetadataBody
|
|
137
|
+
*/
|
|
138
|
+
model_outputs?: Array<ModelIO> | null;
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @type {string}
|
|
142
|
+
* @memberof CreateModelMetadataBody
|
|
143
|
+
*/
|
|
144
|
+
model_type?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* Architecture fields
|
|
147
|
+
* @type {boolean}
|
|
148
|
+
* @memberof CreateModelMetadataBody
|
|
149
|
+
*/
|
|
150
|
+
multi_modal?: boolean | null;
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @type {string}
|
|
154
|
+
* @memberof CreateModelMetadataBody
|
|
155
|
+
*/
|
|
156
|
+
name?: string | null;
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
* @type {boolean}
|
|
160
|
+
* @memberof CreateModelMetadataBody
|
|
161
|
+
*/
|
|
162
|
+
pretrained?: boolean | null;
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @type {Array<string>}
|
|
166
|
+
* @memberof CreateModelMetadataBody
|
|
167
|
+
*/
|
|
168
|
+
pretraining_datasets?: Array<string> | null;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @type {boolean}
|
|
172
|
+
* @memberof CreateModelMetadataBody
|
|
173
|
+
*/
|
|
174
|
+
pruned?: boolean | null;
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @type {boolean}
|
|
178
|
+
* @memberof CreateModelMetadataBody
|
|
179
|
+
*/
|
|
180
|
+
quantization_aware?: boolean | null;
|
|
181
|
+
/**
|
|
182
|
+
* Regulatory and Compliance Fields
|
|
183
|
+
* A vector or strings that represent regulatory standards. Ex HIPPA
|
|
184
|
+
* @type {Array<string>}
|
|
185
|
+
* @memberof CreateModelMetadataBody
|
|
186
|
+
*/
|
|
187
|
+
regulatory?: Array<string> | null;
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
* @type {boolean}
|
|
191
|
+
* @memberof CreateModelMetadataBody
|
|
192
|
+
*/
|
|
193
|
+
slimmed?: boolean | null;
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
* @type {boolean}
|
|
197
|
+
* @memberof CreateModelMetadataBody
|
|
198
|
+
*/
|
|
199
|
+
supports_quantization?: boolean | null;
|
|
200
|
+
/**
|
|
201
|
+
* Inference Fields
|
|
202
|
+
* @type {Array<Task>}
|
|
203
|
+
* @memberof CreateModelMetadataBody
|
|
204
|
+
*/
|
|
205
|
+
task_types?: Array<Task> | null;
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @type {string}
|
|
209
|
+
* @memberof CreateModelMetadataBody
|
|
210
|
+
*/
|
|
211
|
+
tenant_id?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @type {boolean}
|
|
215
|
+
* @memberof CreateModelMetadataBody
|
|
216
|
+
*/
|
|
217
|
+
training_distributed?: boolean | null;
|
|
218
|
+
/**
|
|
219
|
+
*
|
|
220
|
+
* @type {HardwareRequirements}
|
|
221
|
+
* @memberof CreateModelMetadataBody
|
|
222
|
+
*/
|
|
223
|
+
training_hardware?: HardwareRequirements;
|
|
224
|
+
/**
|
|
225
|
+
* Training performance fields
|
|
226
|
+
* @type {number}
|
|
227
|
+
* @memberof CreateModelMetadataBody
|
|
228
|
+
*/
|
|
229
|
+
training_max_energy_consumption_watts?: number | null;
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @type {string}
|
|
233
|
+
* @memberof CreateModelMetadataBody
|
|
234
|
+
*/
|
|
235
|
+
training_precision?: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* Training-related Fields
|
|
238
|
+
* @type {number}
|
|
239
|
+
* @memberof CreateModelMetadataBody
|
|
240
|
+
*/
|
|
241
|
+
training_time?: number | null;
|
|
242
|
+
}
|
|
243
|
+
export declare function CreateModelMetadataBodyFromJSON(json: any): CreateModelMetadataBody;
|
|
244
|
+
export declare function CreateModelMetadataBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateModelMetadataBody;
|
|
245
|
+
export declare function CreateModelMetadataBodyToJSON(value?: CreateModelMetadataBody | null): any;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MLHub Models API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateModelMetadataBodyFromJSON = CreateModelMetadataBodyFromJSON;
|
|
17
|
+
exports.CreateModelMetadataBodyFromJSONTyped = CreateModelMetadataBodyFromJSONTyped;
|
|
18
|
+
exports.CreateModelMetadataBodyToJSON = CreateModelMetadataBodyToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
var _1 = require("./");
|
|
21
|
+
function CreateModelMetadataBodyFromJSON(json) {
|
|
22
|
+
return CreateModelMetadataBodyFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
function CreateModelMetadataBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if ((json === undefined) || (json === null)) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'annotations': !(0, runtime_1.exists)(json, 'annotations') ? undefined : json['annotations'],
|
|
30
|
+
'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
|
+
'keywords': !(0, runtime_1.exists)(json, 'keywords') ? undefined : json['keywords'],
|
|
45
|
+
'libraries': !(0, runtime_1.exists)(json, 'libraries') ? undefined : json['libraries'],
|
|
46
|
+
'license': !(0, runtime_1.exists)(json, 'license') ? undefined : json['license'],
|
|
47
|
+
'model_inputs': !(0, runtime_1.exists)(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : json['model_inputs'].map(_1.ModelIOFromJSON)),
|
|
48
|
+
'model_outputs': !(0, runtime_1.exists)(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : json['model_outputs'].map(_1.ModelIOFromJSON)),
|
|
49
|
+
'model_type': !(0, runtime_1.exists)(json, 'model_type') ? undefined : json['model_type'],
|
|
50
|
+
'multi_modal': !(0, runtime_1.exists)(json, 'multi_modal') ? undefined : json['multi_modal'],
|
|
51
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
52
|
+
'pretrained': !(0, runtime_1.exists)(json, 'pretrained') ? undefined : json['pretrained'],
|
|
53
|
+
'pretraining_datasets': !(0, runtime_1.exists)(json, 'pretraining_datasets') ? undefined : json['pretraining_datasets'],
|
|
54
|
+
'pruned': !(0, runtime_1.exists)(json, 'pruned') ? undefined : json['pruned'],
|
|
55
|
+
'quantization_aware': !(0, runtime_1.exists)(json, 'quantization_aware') ? undefined : json['quantization_aware'],
|
|
56
|
+
'regulatory': !(0, runtime_1.exists)(json, 'regulatory') ? undefined : json['regulatory'],
|
|
57
|
+
'slimmed': !(0, runtime_1.exists)(json, 'slimmed') ? undefined : json['slimmed'],
|
|
58
|
+
'supports_quantization': !(0, runtime_1.exists)(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
59
|
+
'task_types': !(0, runtime_1.exists)(json, 'task_types') ? undefined : (json['task_types'] === null ? null : json['task_types'].map(_1.TaskFromJSON)),
|
|
60
|
+
'tenant_id': !(0, runtime_1.exists)(json, 'tenant_id') ? undefined : json['tenant_id'],
|
|
61
|
+
'training_distributed': !(0, runtime_1.exists)(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
62
|
+
'training_hardware': !(0, runtime_1.exists)(json, 'training_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['training_hardware']),
|
|
63
|
+
'training_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
64
|
+
'training_precision': !(0, runtime_1.exists)(json, 'training_precision') ? undefined : json['training_precision'],
|
|
65
|
+
'training_time': !(0, runtime_1.exists)(json, 'training_time') ? undefined : json['training_time'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function CreateModelMetadataBodyToJSON(value) {
|
|
69
|
+
if (value === undefined) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
if (value === null) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
'annotations': value.annotations,
|
|
77
|
+
'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
|
+
'keywords': value.keywords,
|
|
92
|
+
'libraries': value.libraries,
|
|
93
|
+
'license': value.license,
|
|
94
|
+
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : value.model_inputs.map(_1.ModelIOToJSON)),
|
|
95
|
+
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : value.model_outputs.map(_1.ModelIOToJSON)),
|
|
96
|
+
'model_type': value.model_type,
|
|
97
|
+
'multi_modal': value.multi_modal,
|
|
98
|
+
'name': value.name,
|
|
99
|
+
'pretrained': value.pretrained,
|
|
100
|
+
'pretraining_datasets': value.pretraining_datasets,
|
|
101
|
+
'pruned': value.pruned,
|
|
102
|
+
'quantization_aware': value.quantization_aware,
|
|
103
|
+
'regulatory': value.regulatory,
|
|
104
|
+
'slimmed': value.slimmed,
|
|
105
|
+
'supports_quantization': value.supports_quantization,
|
|
106
|
+
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : value.task_types.map(_1.TaskToJSON)),
|
|
107
|
+
'tenant_id': value.tenant_id,
|
|
108
|
+
'training_distributed': value.training_distributed,
|
|
109
|
+
'training_hardware': (0, _1.HardwareRequirementsToJSON)(value.training_hardware),
|
|
110
|
+
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
|
111
|
+
'training_precision': value.training_precision,
|
|
112
|
+
'training_time': value.training_time,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
@@ -16,12 +16,6 @@ import { DiscoveryCriterion } from './';
|
|
|
16
16
|
* @interface DiscoveryCriteria
|
|
17
17
|
*/
|
|
18
18
|
export interface DiscoveryCriteria {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof DiscoveryCriteria
|
|
23
|
-
*/
|
|
24
|
-
confidence_threshold?: number | null;
|
|
25
19
|
/**
|
|
26
20
|
*
|
|
27
21
|
* @type {Array<DiscoveryCriterion>}
|
|
@@ -26,7 +26,6 @@ function DiscoveryCriteriaFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
'confidence_threshold': !(0, runtime_1.exists)(json, 'confidence_threshold') ? undefined : json['confidence_threshold'],
|
|
30
29
|
'criteria': (json['criteria'].map(_1.DiscoveryCriterionFromJSON)),
|
|
31
30
|
'prompt': !(0, runtime_1.exists)(json, 'prompt') ? undefined : json['prompt'],
|
|
32
31
|
};
|
|
@@ -39,7 +38,6 @@ function DiscoveryCriteriaToJSON(value) {
|
|
|
39
38
|
return null;
|
|
40
39
|
}
|
|
41
40
|
return {
|
|
42
|
-
'confidence_threshold': value.confidence_threshold,
|
|
43
41
|
'criteria': (value.criteria.map(_1.DiscoveryCriterionToJSON)),
|
|
44
42
|
'prompt': value.prompt,
|
|
45
43
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 Locator
|
|
16
|
+
*/
|
|
17
|
+
export interface Locator {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Locator
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function LocatorFromJSON(json: any): Locator;
|
|
26
|
+
export declare function LocatorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Locator;
|
|
27
|
+
export declare function LocatorToJSON(value?: Locator | null): any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MLHub Models API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.LocatorFromJSON = LocatorFromJSON;
|
|
17
|
+
exports.LocatorFromJSONTyped = LocatorFromJSONTyped;
|
|
18
|
+
exports.LocatorToJSON = LocatorToJSON;
|
|
19
|
+
function LocatorFromJSON(json) {
|
|
20
|
+
return LocatorFromJSONTyped(json, false);
|
|
21
|
+
}
|
|
22
|
+
function LocatorFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'url': json['url'],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function LocatorToJSON(value) {
|
|
31
|
+
if (value === undefined) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (value === null) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'url': value.url,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { HardwareRequirements, ModelIO, Task } from './';
|
|
12
|
+
import { Canonical, HardwareRequirements, ModelIO, Task } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -34,6 +34,12 @@ export interface ModelMetadata {
|
|
|
34
34
|
* @memberof ModelMetadata
|
|
35
35
|
*/
|
|
36
36
|
bias_evaluation_score?: number | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Canonical}
|
|
40
|
+
* @memberof ModelMetadata
|
|
41
|
+
*/
|
|
42
|
+
canonical?: Canonical;
|
|
37
43
|
/**
|
|
38
44
|
*
|
|
39
45
|
* @type {boolean}
|
|
@@ -203,6 +209,12 @@ export interface ModelMetadata {
|
|
|
203
209
|
* @memberof ModelMetadata
|
|
204
210
|
*/
|
|
205
211
|
task_types?: Array<Task> | null;
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @type {string}
|
|
215
|
+
* @memberof ModelMetadata
|
|
216
|
+
*/
|
|
217
|
+
tenant_id?: string | null;
|
|
206
218
|
/**
|
|
207
219
|
*
|
|
208
220
|
* @type {boolean}
|
|
@@ -29,6 +29,7 @@ function ModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
'annotations': !(0, runtime_1.exists)(json, 'annotations') ? undefined : json['annotations'],
|
|
30
30
|
'author': !(0, runtime_1.exists)(json, 'author') ? undefined : json['author'],
|
|
31
31
|
'bias_evaluation_score': !(0, runtime_1.exists)(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
32
|
+
'canonical': !(0, runtime_1.exists)(json, 'canonical') ? undefined : (0, _1.CanonicalFromJSON)(json['canonical']),
|
|
32
33
|
'edge_optimized': !(0, runtime_1.exists)(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
33
34
|
'finetuning_datasets': !(0, runtime_1.exists)(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
34
35
|
'image': !(0, runtime_1.exists)(json, 'image') ? undefined : json['image'],
|
|
@@ -57,6 +58,7 @@ function ModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
58
|
'slimmed': !(0, runtime_1.exists)(json, 'slimmed') ? undefined : json['slimmed'],
|
|
58
59
|
'supports_quantization': !(0, runtime_1.exists)(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
59
60
|
'task_types': !(0, runtime_1.exists)(json, 'task_types') ? undefined : (json['task_types'] === null ? null : json['task_types'].map(_1.TaskFromJSON)),
|
|
61
|
+
'tenant_id': !(0, runtime_1.exists)(json, 'tenant_id') ? undefined : json['tenant_id'],
|
|
60
62
|
'training_distributed': !(0, runtime_1.exists)(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
61
63
|
'training_hardware': !(0, runtime_1.exists)(json, 'training_hardware') ? undefined : (0, _1.HardwareRequirementsFromJSON)(json['training_hardware']),
|
|
62
64
|
'training_max_energy_consumption_watts': !(0, runtime_1.exists)(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
@@ -75,6 +77,7 @@ function ModelMetadataToJSON(value) {
|
|
|
75
77
|
'annotations': value.annotations,
|
|
76
78
|
'author': value.author,
|
|
77
79
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
80
|
+
'canonical': (0, _1.CanonicalToJSON)(value.canonical),
|
|
78
81
|
'edge_optimized': value.edge_optimized,
|
|
79
82
|
'finetuning_datasets': value.finetuning_datasets,
|
|
80
83
|
'image': value.image,
|
|
@@ -103,6 +106,7 @@ function ModelMetadataToJSON(value) {
|
|
|
103
106
|
'slimmed': value.slimmed,
|
|
104
107
|
'supports_quantization': value.supports_quantization,
|
|
105
108
|
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : value.task_types.map(_1.TaskToJSON)),
|
|
109
|
+
'tenant_id': value.tenant_id,
|
|
106
110
|
'training_distributed': value.training_distributed,
|
|
107
111
|
'training_hardware': (0, _1.HardwareRequirementsToJSON)(value.training_hardware),
|
|
108
112
|
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
package/dist/models/index.d.ts
CHANGED
|
@@ -5,9 +5,11 @@ export * from './ArtifactIngestionStatus';
|
|
|
5
5
|
export * from './ArtifactPublication';
|
|
6
6
|
export * from './ArtifactPublicationStatus';
|
|
7
7
|
export * from './ArtifactType';
|
|
8
|
-
export * from './
|
|
8
|
+
export * from './AssociateModelMetadataBody';
|
|
9
9
|
export * from './AssociateModelMetadataResponse';
|
|
10
10
|
export * from './BadRequestResponse';
|
|
11
|
+
export * from './Canonical';
|
|
12
|
+
export * from './CreateModelMetadataBody';
|
|
11
13
|
export * from './CreateModelMetadataResponse';
|
|
12
14
|
export * from './DiscoverModelsByPlatformResponse';
|
|
13
15
|
export * from './DiscoverModelsResponse';
|
|
@@ -29,6 +31,7 @@ export * from './ListModelsByPlatformResponse';
|
|
|
29
31
|
export * from './ListModelsResponse';
|
|
30
32
|
export * from './ListPlatformsResponse';
|
|
31
33
|
export * from './ListTasksResponse';
|
|
34
|
+
export * from './Locator';
|
|
32
35
|
export * from './ModelArtifact';
|
|
33
36
|
export * from './ModelIO';
|
|
34
37
|
export * from './ModelMetadata';
|
package/dist/models/index.js
CHANGED
|
@@ -23,9 +23,11 @@ __exportStar(require("./ArtifactIngestionStatus"), exports);
|
|
|
23
23
|
__exportStar(require("./ArtifactPublication"), exports);
|
|
24
24
|
__exportStar(require("./ArtifactPublicationStatus"), exports);
|
|
25
25
|
__exportStar(require("./ArtifactType"), exports);
|
|
26
|
-
__exportStar(require("./
|
|
26
|
+
__exportStar(require("./AssociateModelMetadataBody"), exports);
|
|
27
27
|
__exportStar(require("./AssociateModelMetadataResponse"), exports);
|
|
28
28
|
__exportStar(require("./BadRequestResponse"), exports);
|
|
29
|
+
__exportStar(require("./Canonical"), exports);
|
|
30
|
+
__exportStar(require("./CreateModelMetadataBody"), exports);
|
|
29
31
|
__exportStar(require("./CreateModelMetadataResponse"), exports);
|
|
30
32
|
__exportStar(require("./DiscoverModelsByPlatformResponse"), exports);
|
|
31
33
|
__exportStar(require("./DiscoverModelsResponse"), exports);
|
|
@@ -47,6 +49,7 @@ __exportStar(require("./ListModelsByPlatformResponse"), exports);
|
|
|
47
49
|
__exportStar(require("./ListModelsResponse"), exports);
|
|
48
50
|
__exportStar(require("./ListPlatformsResponse"), exports);
|
|
49
51
|
__exportStar(require("./ListTasksResponse"), exports);
|
|
52
|
+
__exportStar(require("./Locator"), exports);
|
|
50
53
|
__exportStar(require("./ModelArtifact"), exports);
|
|
51
54
|
__exportStar(require("./ModelIO"), exports);
|
|
52
55
|
__exportStar(require("./ModelMetadata"), exports);
|
package/package.json
CHANGED
package/src/apis/ArtifactsApi.ts
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
AssociateModelMetadataBody,
|
|
19
|
+
AssociateModelMetadataBodyFromJSON,
|
|
20
|
+
AssociateModelMetadataBodyToJSON,
|
|
21
21
|
AssociateModelMetadataResponse,
|
|
22
22
|
AssociateModelMetadataResponseFromJSON,
|
|
23
23
|
AssociateModelMetadataResponseToJSON,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
|
|
41
41
|
export interface AssociateModelMetadataWithArtifactRequest {
|
|
42
42
|
artifactId: string;
|
|
43
|
-
|
|
43
|
+
associateModelMetadataBody: AssociateModelMetadataBody;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface GetModelArtifactRequest {
|
|
@@ -60,8 +60,8 @@ export class ArtifactsApi extends runtime.BaseAPI {
|
|
|
60
60
|
throw new runtime.RequiredError('artifactId','Required parameter requestParameters.artifactId was null or undefined when calling associateModelMetadataWithArtifact.');
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
if (requestParameters.
|
|
64
|
-
throw new runtime.RequiredError('
|
|
63
|
+
if (requestParameters.associateModelMetadataBody === null || requestParameters.associateModelMetadataBody === undefined) {
|
|
64
|
+
throw new runtime.RequiredError('associateModelMetadataBody','Required parameter requestParameters.associateModelMetadataBody was null or undefined when calling associateModelMetadataWithArtifact.');
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const queryParameters: any = {};
|
|
@@ -75,7 +75,7 @@ export class ArtifactsApi extends runtime.BaseAPI {
|
|
|
75
75
|
method: 'POST',
|
|
76
76
|
headers: headerParameters,
|
|
77
77
|
query: queryParameters,
|
|
78
|
-
body:
|
|
78
|
+
body: AssociateModelMetadataBodyToJSON(requestParameters.associateModelMetadataBody),
|
|
79
79
|
}, initOverrides);
|
|
80
80
|
|
|
81
81
|
return new runtime.JSONApiResponse(response, (jsonValue) => AssociateModelMetadataResponseFromJSON(jsonValue));
|