@mlhub/models-ts-sdk 0.1.0 → 0.2.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 +4 -7
- package/dist/apis/ModelsApi.js +6 -11
- 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 +10 -21
- 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,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));
|
package/src/apis/ModelsApi.ts
CHANGED
|
@@ -18,6 +18,9 @@ import {
|
|
|
18
18
|
BadRequestResponse,
|
|
19
19
|
BadRequestResponseFromJSON,
|
|
20
20
|
BadRequestResponseToJSON,
|
|
21
|
+
CreateModelMetadataBody,
|
|
22
|
+
CreateModelMetadataBodyFromJSON,
|
|
23
|
+
CreateModelMetadataBodyToJSON,
|
|
21
24
|
CreateModelMetadataResponse,
|
|
22
25
|
CreateModelMetadataResponseFromJSON,
|
|
23
26
|
CreateModelMetadataResponseToJSON,
|
|
@@ -39,9 +42,6 @@ import {
|
|
|
39
42
|
ListModelsResponse,
|
|
40
43
|
ListModelsResponseFromJSON,
|
|
41
44
|
ListModelsResponseToJSON,
|
|
42
|
-
ModelMetadata,
|
|
43
|
-
ModelMetadataFromJSON,
|
|
44
|
-
ModelMetadataToJSON,
|
|
45
45
|
NotFoundResponse,
|
|
46
46
|
NotFoundResponseFromJSON,
|
|
47
47
|
NotFoundResponseToJSON,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from '../models';
|
|
52
52
|
|
|
53
53
|
export interface CreateModelMetadataRequest {
|
|
54
|
-
|
|
54
|
+
createModelMetadataBody: CreateModelMetadataBody;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export interface DiscoverModelsRequest {
|
|
@@ -72,10 +72,6 @@ export interface IngestCanonicalModelRequest {
|
|
|
72
72
|
ingestArtifactRequest: IngestArtifactRequest;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export interface ListModelsRequest {
|
|
76
|
-
modelMetadata: ModelMetadata;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
75
|
export interface ListModelsByAuthorRequest {
|
|
80
76
|
author: string;
|
|
81
77
|
}
|
|
@@ -89,8 +85,8 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
89
85
|
* Create a model metadata
|
|
90
86
|
*/
|
|
91
87
|
async createModelMetadataRaw(requestParameters: CreateModelMetadataRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CreateModelMetadataResponse>> {
|
|
92
|
-
if (requestParameters.
|
|
93
|
-
throw new runtime.RequiredError('
|
|
88
|
+
if (requestParameters.createModelMetadataBody === null || requestParameters.createModelMetadataBody === undefined) {
|
|
89
|
+
throw new runtime.RequiredError('createModelMetadataBody','Required parameter requestParameters.createModelMetadataBody was null or undefined when calling createModelMetadata.');
|
|
94
90
|
}
|
|
95
91
|
|
|
96
92
|
const queryParameters: any = {};
|
|
@@ -104,7 +100,7 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
104
100
|
method: 'POST',
|
|
105
101
|
headers: headerParameters,
|
|
106
102
|
query: queryParameters,
|
|
107
|
-
body:
|
|
103
|
+
body: CreateModelMetadataBodyToJSON(requestParameters.createModelMetadataBody),
|
|
108
104
|
}, initOverrides);
|
|
109
105
|
|
|
110
106
|
return new runtime.JSONApiResponse(response, (jsonValue) => CreateModelMetadataResponseFromJSON(jsonValue));
|
|
@@ -241,23 +237,16 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
241
237
|
/**
|
|
242
238
|
* List all models
|
|
243
239
|
*/
|
|
244
|
-
async listModelsRaw(
|
|
245
|
-
if (requestParameters.modelMetadata === null || requestParameters.modelMetadata === undefined) {
|
|
246
|
-
throw new runtime.RequiredError('modelMetadata','Required parameter requestParameters.modelMetadata was null or undefined when calling listModels.');
|
|
247
|
-
}
|
|
248
|
-
|
|
240
|
+
async listModelsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListModelsResponse>> {
|
|
249
241
|
const queryParameters: any = {};
|
|
250
242
|
|
|
251
243
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
252
244
|
|
|
253
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
254
|
-
|
|
255
245
|
const response = await this.request({
|
|
256
246
|
path: `/models-api/models`,
|
|
257
247
|
method: 'GET',
|
|
258
248
|
headers: headerParameters,
|
|
259
249
|
query: queryParameters,
|
|
260
|
-
body: ModelMetadataToJSON(requestParameters.modelMetadata),
|
|
261
250
|
}, initOverrides);
|
|
262
251
|
|
|
263
252
|
return new runtime.JSONApiResponse(response, (jsonValue) => ListModelsResponseFromJSON(jsonValue));
|
|
@@ -266,8 +255,8 @@ export class ModelsApi extends runtime.BaseAPI {
|
|
|
266
255
|
/**
|
|
267
256
|
* List all models
|
|
268
257
|
*/
|
|
269
|
-
async listModels(
|
|
270
|
-
const response = await this.listModelsRaw(
|
|
258
|
+
async listModels(initOverrides?: RequestInit): Promise<ListModelsResponse> {
|
|
259
|
+
const response = await this.listModelsRaw(initOverrides);
|
|
271
260
|
return await response.value();
|
|
272
261
|
}
|
|
273
262
|
|
|
@@ -16,28 +16,28 @@ import { exists, mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface AssociateModelMetadataBody
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface AssociateModelMetadataBody {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof AssociateModelMetadataBody
|
|
26
26
|
*/
|
|
27
27
|
author: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof AssociateModelMetadataBody
|
|
32
32
|
*/
|
|
33
33
|
name: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function
|
|
37
|
-
return
|
|
36
|
+
export function AssociateModelMetadataBodyFromJSON(json: any): AssociateModelMetadataBody {
|
|
37
|
+
return AssociateModelMetadataBodyFromJSONTyped(json, false);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export function
|
|
40
|
+
export function AssociateModelMetadataBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssociateModelMetadataBody {
|
|
41
41
|
if ((json === undefined) || (json === null)) {
|
|
42
42
|
return json;
|
|
43
43
|
}
|
|
@@ -48,7 +48,7 @@ export function AssociateModelMetadataFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function
|
|
51
|
+
export function AssociateModelMetadataBodyToJSON(value?: AssociateModelMetadataBody | null): any {
|
|
52
52
|
if (value === undefined) {
|
|
53
53
|
return undefined;
|
|
54
54
|
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Models API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
Locator,
|
|
18
|
+
LocatorFromJSON,
|
|
19
|
+
LocatorFromJSONTyped,
|
|
20
|
+
LocatorToJSON,
|
|
21
|
+
Platform,
|
|
22
|
+
PlatformFromJSON,
|
|
23
|
+
PlatformFromJSONTyped,
|
|
24
|
+
PlatformToJSON,
|
|
25
|
+
} from './';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @interface Canonical
|
|
31
|
+
*/
|
|
32
|
+
export interface Canonical {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof Canonical
|
|
37
|
+
*/
|
|
38
|
+
author?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof Canonical
|
|
43
|
+
*/
|
|
44
|
+
downloads?: number | null;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
* @memberof Canonical
|
|
49
|
+
*/
|
|
50
|
+
gated?: boolean | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof Canonical
|
|
55
|
+
*/
|
|
56
|
+
likes?: number | null;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {Locator}
|
|
60
|
+
* @memberof Canonical
|
|
61
|
+
*/
|
|
62
|
+
locator: Locator;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof Canonical
|
|
67
|
+
*/
|
|
68
|
+
model_id: string;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {Platform}
|
|
72
|
+
* @memberof Canonical
|
|
73
|
+
*/
|
|
74
|
+
platform: Platform;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @memberof Canonical
|
|
79
|
+
*/
|
|
80
|
+
_private?: boolean | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof Canonical
|
|
85
|
+
*/
|
|
86
|
+
sha?: string | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function CanonicalFromJSON(json: any): Canonical {
|
|
90
|
+
return CanonicalFromJSONTyped(json, false);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function CanonicalFromJSONTyped(json: any, ignoreDiscriminator: boolean): Canonical {
|
|
94
|
+
if ((json === undefined) || (json === null)) {
|
|
95
|
+
return json;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'author': !exists(json, 'author') ? undefined : json['author'],
|
|
100
|
+
'downloads': !exists(json, 'downloads') ? undefined : json['downloads'],
|
|
101
|
+
'gated': !exists(json, 'gated') ? undefined : json['gated'],
|
|
102
|
+
'likes': !exists(json, 'likes') ? undefined : json['likes'],
|
|
103
|
+
'locator': LocatorFromJSON(json['locator']),
|
|
104
|
+
'model_id': json['model_id'],
|
|
105
|
+
'platform': PlatformFromJSON(json['platform']),
|
|
106
|
+
'_private': !exists(json, 'private') ? undefined : json['private'],
|
|
107
|
+
'sha': !exists(json, 'sha') ? undefined : json['sha'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function CanonicalToJSON(value?: Canonical | null): any {
|
|
112
|
+
if (value === undefined) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
if (value === null) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'author': value.author,
|
|
121
|
+
'downloads': value.downloads,
|
|
122
|
+
'gated': value.gated,
|
|
123
|
+
'likes': value.likes,
|
|
124
|
+
'locator': LocatorToJSON(value.locator),
|
|
125
|
+
'model_id': value.model_id,
|
|
126
|
+
'platform': PlatformToJSON(value.platform),
|
|
127
|
+
'private': value._private,
|
|
128
|
+
'sha': value.sha,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|