@mlhub/models-ts-sdk 0.0.4 → 0.0.6
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/README.md +2 -2
- package/dist/apis/PlatformsApi.d.ts +2 -0
- package/dist/apis/PlatformsApi.js +6 -0
- package/dist/models/DiscoveryCriterion.d.ts +7 -7
- package/dist/models/DiscoveryCriterion.js +4 -4
- package/dist/models/ModelMetadata.d.ts +1 -1
- package/dist/models/ModelMetadata.js +2 -2
- package/package.json +1 -1
- package/src/apis/PlatformsApi.ts +10 -0
- package/src/models/DiscoveryCriterion.ts +11 -11
- package/src/models/ModelMetadata.ts +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/models-ts-sdk@0.0.
|
|
1
|
+
## @mlhub/models-ts-sdk@0.0.6
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @mlhub/models-ts-sdk@0.0.
|
|
39
|
+
npm install @mlhub/models-ts-sdk@0.0.6 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -229,6 +229,12 @@ var PlatformsApi = /** @class */ (function (_super) {
|
|
|
229
229
|
throw new runtime.RequiredError('platform', 'Required parameter requestParameters.platform was null or undefined when calling listModelsByPlatform.');
|
|
230
230
|
}
|
|
231
231
|
queryParameters = {};
|
|
232
|
+
if (requestParameters.limit !== undefined) {
|
|
233
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
234
|
+
}
|
|
235
|
+
if (requestParameters.offset !== undefined) {
|
|
236
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
237
|
+
}
|
|
232
238
|
headerParameters = {};
|
|
233
239
|
return [4 /*yield*/, this.request({
|
|
234
240
|
path: "/models-api/platforms/{platform}/models".replace("{" + "platform" + "}", encodeURIComponent(String(requestParameters.platform))),
|
|
@@ -21,7 +21,7 @@ export interface DiscoveryCriterion {
|
|
|
21
21
|
* @type {any}
|
|
22
22
|
* @memberof DiscoveryCriterion
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
annotations?: any | null;
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
* @type {string}
|
|
@@ -46,12 +46,6 @@ export interface DiscoveryCriterion {
|
|
|
46
46
|
* @memberof DiscoveryCriterion
|
|
47
47
|
*/
|
|
48
48
|
finetuning_datasets?: Array<string> | null;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @type {string}
|
|
52
|
-
* @memberof DiscoveryCriterion
|
|
53
|
-
*/
|
|
54
|
-
framework?: string | null;
|
|
55
49
|
/**
|
|
56
50
|
*
|
|
57
51
|
* @type {string}
|
|
@@ -118,6 +112,12 @@ export interface DiscoveryCriterion {
|
|
|
118
112
|
* @memberof DiscoveryCriterion
|
|
119
113
|
*/
|
|
120
114
|
keywords?: Array<string> | null;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {Array<string>}
|
|
118
|
+
* @memberof DiscoveryCriterion
|
|
119
|
+
*/
|
|
120
|
+
libraries?: Array<string> | null;
|
|
121
121
|
/**
|
|
122
122
|
*
|
|
123
123
|
* @type {string}
|
|
@@ -24,12 +24,11 @@ function DiscoveryCriterionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
24
|
return json;
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
'
|
|
27
|
+
'annotations': !runtime_1.exists(json, 'annotations') ? undefined : json['annotations'],
|
|
28
28
|
'author': !runtime_1.exists(json, 'author') ? undefined : json['author'],
|
|
29
29
|
'bias_evaluation_score': !runtime_1.exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
30
30
|
'edge_optimized': !runtime_1.exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
31
31
|
'finetuning_datasets': !runtime_1.exists(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
32
|
-
'framework': !runtime_1.exists(json, 'framework') ? undefined : json['framework'],
|
|
33
32
|
'image': !runtime_1.exists(json, 'image') ? undefined : json['image'],
|
|
34
33
|
'inference_distributed': !runtime_1.exists(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
35
34
|
'inference_hardware': !runtime_1.exists(json, 'inference_hardware') ? undefined : _1.HardwareRequirementsFromJSON(json['inference_hardware']),
|
|
@@ -41,6 +40,7 @@ function DiscoveryCriterionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
40
|
'inference_precision': !runtime_1.exists(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
42
41
|
'inference_software_dependencies': !runtime_1.exists(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
43
42
|
'keywords': !runtime_1.exists(json, 'keywords') ? undefined : json['keywords'],
|
|
43
|
+
'libraries': !runtime_1.exists(json, 'libraries') ? undefined : json['libraries'],
|
|
44
44
|
'license': !runtime_1.exists(json, 'license') ? undefined : json['license'],
|
|
45
45
|
'model_inputs': !runtime_1.exists(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : json['model_inputs'].map(_1.ModelIOFromJSON)),
|
|
46
46
|
'model_outputs': !runtime_1.exists(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : json['model_outputs'].map(_1.ModelIOFromJSON)),
|
|
@@ -72,12 +72,11 @@ function DiscoveryCriterionToJSON(value) {
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
return {
|
|
75
|
-
'
|
|
75
|
+
'annotations': value.annotations,
|
|
76
76
|
'author': value.author,
|
|
77
77
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
78
78
|
'edge_optimized': value.edge_optimized,
|
|
79
79
|
'finetuning_datasets': value.finetuning_datasets,
|
|
80
|
-
'framework': value.framework,
|
|
81
80
|
'image': value.image,
|
|
82
81
|
'inference_distributed': value.inference_distributed,
|
|
83
82
|
'inference_hardware': _1.HardwareRequirementsToJSON(value.inference_hardware),
|
|
@@ -89,6 +88,7 @@ function DiscoveryCriterionToJSON(value) {
|
|
|
89
88
|
'inference_precision': value.inference_precision,
|
|
90
89
|
'inference_software_dependencies': value.inference_software_dependencies,
|
|
91
90
|
'keywords': value.keywords,
|
|
91
|
+
'libraries': value.libraries,
|
|
92
92
|
'license': value.license,
|
|
93
93
|
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : value.model_inputs.map(_1.ModelIOToJSON)),
|
|
94
94
|
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : value.model_outputs.map(_1.ModelIOToJSON)),
|
|
@@ -24,7 +24,7 @@ function ModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
24
|
return json;
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
'
|
|
27
|
+
'annotations': !runtime_1.exists(json, 'annotations') ? undefined : json['annotations'],
|
|
28
28
|
'author': !runtime_1.exists(json, 'author') ? undefined : json['author'],
|
|
29
29
|
'bias_evaluation_score': !runtime_1.exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
30
30
|
'edge_optimized': !runtime_1.exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
@@ -71,7 +71,7 @@ function ModelMetadataToJSON(value) {
|
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
|
-
'
|
|
74
|
+
'annotations': value.annotations,
|
|
75
75
|
'author': value.author,
|
|
76
76
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
77
77
|
'edge_optimized': value.edge_optimized,
|
package/package.json
CHANGED
package/src/apis/PlatformsApi.ts
CHANGED
|
@@ -68,6 +68,8 @@ export interface IngestExternalModelRequest {
|
|
|
68
68
|
|
|
69
69
|
export interface ListModelsByPlatformRequest {
|
|
70
70
|
platform: Platform;
|
|
71
|
+
limit?: number;
|
|
72
|
+
offset?: number;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
/**
|
|
@@ -197,6 +199,14 @@ export class PlatformsApi extends runtime.BaseAPI {
|
|
|
197
199
|
|
|
198
200
|
const queryParameters: any = {};
|
|
199
201
|
|
|
202
|
+
if (requestParameters.limit !== undefined) {
|
|
203
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (requestParameters.offset !== undefined) {
|
|
207
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
208
|
+
}
|
|
209
|
+
|
|
200
210
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
201
211
|
|
|
202
212
|
const response = await this.request({
|
|
@@ -39,7 +39,7 @@ export interface DiscoveryCriterion {
|
|
|
39
39
|
* @type {any}
|
|
40
40
|
* @memberof DiscoveryCriterion
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
annotations?: any | null;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {string}
|
|
@@ -64,12 +64,6 @@ export interface DiscoveryCriterion {
|
|
|
64
64
|
* @memberof DiscoveryCriterion
|
|
65
65
|
*/
|
|
66
66
|
finetuning_datasets?: Array<string> | null;
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* @type {string}
|
|
70
|
-
* @memberof DiscoveryCriterion
|
|
71
|
-
*/
|
|
72
|
-
framework?: string | null;
|
|
73
67
|
/**
|
|
74
68
|
*
|
|
75
69
|
* @type {string}
|
|
@@ -136,6 +130,12 @@ export interface DiscoveryCriterion {
|
|
|
136
130
|
* @memberof DiscoveryCriterion
|
|
137
131
|
*/
|
|
138
132
|
keywords?: Array<string> | null;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {Array<string>}
|
|
136
|
+
* @memberof DiscoveryCriterion
|
|
137
|
+
*/
|
|
138
|
+
libraries?: Array<string> | null;
|
|
139
139
|
/**
|
|
140
140
|
*
|
|
141
141
|
* @type {string}
|
|
@@ -269,12 +269,11 @@ export function DiscoveryCriterionFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
269
269
|
}
|
|
270
270
|
return {
|
|
271
271
|
|
|
272
|
-
'
|
|
272
|
+
'annotations': !exists(json, 'annotations') ? undefined : json['annotations'],
|
|
273
273
|
'author': !exists(json, 'author') ? undefined : json['author'],
|
|
274
274
|
'bias_evaluation_score': !exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
275
275
|
'edge_optimized': !exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
276
276
|
'finetuning_datasets': !exists(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
277
|
-
'framework': !exists(json, 'framework') ? undefined : json['framework'],
|
|
278
277
|
'image': !exists(json, 'image') ? undefined : json['image'],
|
|
279
278
|
'inference_distributed': !exists(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
280
279
|
'inference_hardware': !exists(json, 'inference_hardware') ? undefined : HardwareRequirementsFromJSON(json['inference_hardware']),
|
|
@@ -286,6 +285,7 @@ export function DiscoveryCriterionFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
286
285
|
'inference_precision': !exists(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
287
286
|
'inference_software_dependencies': !exists(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
288
287
|
'keywords': !exists(json, 'keywords') ? undefined : json['keywords'],
|
|
288
|
+
'libraries': !exists(json, 'libraries') ? undefined : json['libraries'],
|
|
289
289
|
'license': !exists(json, 'license') ? undefined : json['license'],
|
|
290
290
|
'model_inputs': !exists(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : (json['model_inputs'] as Array<any>).map(ModelIOFromJSON)),
|
|
291
291
|
'model_outputs': !exists(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : (json['model_outputs'] as Array<any>).map(ModelIOFromJSON)),
|
|
@@ -318,12 +318,11 @@ export function DiscoveryCriterionToJSON(value?: DiscoveryCriterion | null): any
|
|
|
318
318
|
}
|
|
319
319
|
return {
|
|
320
320
|
|
|
321
|
-
'
|
|
321
|
+
'annotations': value.annotations,
|
|
322
322
|
'author': value.author,
|
|
323
323
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
324
324
|
'edge_optimized': value.edge_optimized,
|
|
325
325
|
'finetuning_datasets': value.finetuning_datasets,
|
|
326
|
-
'framework': value.framework,
|
|
327
326
|
'image': value.image,
|
|
328
327
|
'inference_distributed': value.inference_distributed,
|
|
329
328
|
'inference_hardware': HardwareRequirementsToJSON(value.inference_hardware),
|
|
@@ -335,6 +334,7 @@ export function DiscoveryCriterionToJSON(value?: DiscoveryCriterion | null): any
|
|
|
335
334
|
'inference_precision': value.inference_precision,
|
|
336
335
|
'inference_software_dependencies': value.inference_software_dependencies,
|
|
337
336
|
'keywords': value.keywords,
|
|
337
|
+
'libraries': value.libraries,
|
|
338
338
|
'license': value.license,
|
|
339
339
|
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : (value.model_inputs as Array<any>).map(ModelIOToJSON)),
|
|
340
340
|
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : (value.model_outputs as Array<any>).map(ModelIOToJSON)),
|
|
@@ -39,7 +39,7 @@ export interface ModelMetadata {
|
|
|
39
39
|
* @type {any}
|
|
40
40
|
* @memberof ModelMetadata
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
annotations?: any | null;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {string}
|
|
@@ -263,7 +263,7 @@ export function ModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
263
263
|
}
|
|
264
264
|
return {
|
|
265
265
|
|
|
266
|
-
'
|
|
266
|
+
'annotations': !exists(json, 'annotations') ? undefined : json['annotations'],
|
|
267
267
|
'author': !exists(json, 'author') ? undefined : json['author'],
|
|
268
268
|
'bias_evaluation_score': !exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
269
269
|
'edge_optimized': !exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
@@ -311,7 +311,7 @@ export function ModelMetadataToJSON(value?: ModelMetadata | null): any {
|
|
|
311
311
|
}
|
|
312
312
|
return {
|
|
313
313
|
|
|
314
|
-
'
|
|
314
|
+
'annotations': value.annotations,
|
|
315
315
|
'author': value.author,
|
|
316
316
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
317
317
|
'edge_optimized': value.edge_optimized,
|