@mlhub/models-ts-sdk 0.0.8 → 0.1.1
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/ArtifactsApi.js +20 -13
- package/dist/apis/IngestionsApi.js +17 -10
- package/dist/apis/ModelsApi.d.ts +14 -1
- package/dist/apis/ModelsApi.js +76 -17
- package/dist/apis/PlatformsApi.js +25 -18
- package/dist/apis/PublicationsApi.js +22 -15
- package/dist/apis/TasksApi.js +15 -8
- package/dist/apis/index.js +20 -9
- package/dist/index.js +17 -6
- package/dist/models/Accelerator.js +5 -5
- package/dist/models/Artifact.js +5 -5
- package/dist/models/ArtifactIngestion.js +7 -7
- package/dist/models/ArtifactIngestionStatus.js +5 -4
- package/dist/models/ArtifactPublication.js +6 -6
- package/dist/models/ArtifactPublicationStatus.js +5 -4
- package/dist/models/ArtifactType.js +5 -4
- package/dist/models/AssociateModelMetadata.js +3 -3
- package/dist/models/AssociateModelMetadataResponse.js +3 -3
- package/dist/models/BadRequestResponse.js +3 -3
- package/dist/models/CreateModelMetadataResponse.js +3 -3
- package/dist/models/DiscoverModelsByPlatformResponse.js +3 -3
- package/dist/models/DiscoverModelsResponse.js +3 -3
- package/dist/models/DiscoveryCriteria.js +5 -5
- package/dist/models/DiscoveryCriterion.d.ts +2 -2
- package/dist/models/DiscoveryCriterion.js +42 -42
- package/dist/models/GetModelArtifactResponse.js +5 -5
- package/dist/models/GetModelByPlatformResponse.js +3 -3
- package/dist/models/GetModelIngestionResponse.js +5 -5
- package/dist/models/GetModelPublicationResponse.js +5 -5
- package/dist/models/GetModelResponse.js +3 -3
- package/dist/models/HardwareRequirements.js +8 -8
- package/dist/models/IngestArtifactRequest.js +6 -6
- package/dist/models/IngestModelArtifactResponse.js +5 -5
- package/dist/models/ListModelArtifactResponse.js +3 -3
- package/dist/models/ListModelIngestionsResponse.js +3 -3
- package/dist/models/ListModelPublicationsForArtifactResponse.js +3 -3
- package/dist/models/ListModelPublicationsResponse.js +3 -3
- package/dist/models/ListModelsByPlatformResponse.js +3 -3
- package/dist/models/ListModelsResponse.js +3 -3
- package/dist/models/ListPlatformsResponse.js +3 -3
- package/dist/models/ListTasksResponse.js +3 -3
- package/dist/models/ModelArtifact.d.ts +1 -1
- package/dist/models/ModelArtifact.js +7 -7
- package/dist/models/ModelIO.js +5 -5
- package/dist/models/ModelMetadata.d.ts +2 -2
- package/dist/models/ModelMetadata.js +41 -41
- package/dist/models/NotFoundResponse.js +3 -3
- package/dist/models/Platform.d.ts +3 -2
- package/dist/models/Platform.js +8 -6
- package/dist/models/PlatformDetails.js +5 -5
- package/dist/models/PublishArtifactRequest.js +4 -4
- package/dist/models/PublishModelArtifactResponse.js +5 -5
- package/dist/models/ServerErrorResponse.js +3 -3
- package/dist/models/SystemRequirement.js +3 -3
- package/dist/models/Task.js +5 -4
- package/dist/models/index.js +56 -45
- package/dist/runtime.d.ts +18 -18
- package/dist/runtime.js +45 -35
- package/package.json +3 -3
- package/src/apis/ModelsApi.ts +53 -0
- package/src/apis/PlatformsApi.ts +1 -1
- package/src/models/DiscoveryCriterion.ts +2 -2
- package/src/models/ModelArtifact.ts +1 -1
- package/src/models/ModelMetadata.ts +2 -2
- package/src/models/Platform.ts +3 -2
- package/src/runtime.ts +1 -1
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ListModelsResponseFromJSON = ListModelsResponseFromJSON;
|
|
17
|
+
exports.ListModelsResponseFromJSONTyped = ListModelsResponseFromJSONTyped;
|
|
18
|
+
exports.ListModelsResponseToJSON = ListModelsResponseToJSON;
|
|
16
19
|
var _1 = require("./");
|
|
17
20
|
function ListModelsResponseFromJSON(json) {
|
|
18
21
|
return ListModelsResponseFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.ListModelsResponseFromJSON = ListModelsResponseFromJSON;
|
|
21
23
|
function ListModelsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
@@ -30,7 +32,6 @@ function ListModelsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
32
|
'version': json['version'],
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
exports.ListModelsResponseFromJSONTyped = ListModelsResponseFromJSONTyped;
|
|
34
35
|
function ListModelsResponseToJSON(value) {
|
|
35
36
|
if (value === undefined) {
|
|
36
37
|
return undefined;
|
|
@@ -46,4 +47,3 @@ function ListModelsResponseToJSON(value) {
|
|
|
46
47
|
'version': value.version,
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
exports.ListModelsResponseToJSON = ListModelsResponseToJSON;
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ListPlatformsResponseFromJSON = ListPlatformsResponseFromJSON;
|
|
17
|
+
exports.ListPlatformsResponseFromJSONTyped = ListPlatformsResponseFromJSONTyped;
|
|
18
|
+
exports.ListPlatformsResponseToJSON = ListPlatformsResponseToJSON;
|
|
16
19
|
var _1 = require("./");
|
|
17
20
|
function ListPlatformsResponseFromJSON(json) {
|
|
18
21
|
return ListPlatformsResponseFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.ListPlatformsResponseFromJSON = ListPlatformsResponseFromJSON;
|
|
21
23
|
function ListPlatformsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
@@ -30,7 +32,6 @@ function ListPlatformsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
32
|
'version': json['version'],
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
exports.ListPlatformsResponseFromJSONTyped = ListPlatformsResponseFromJSONTyped;
|
|
34
35
|
function ListPlatformsResponseToJSON(value) {
|
|
35
36
|
if (value === undefined) {
|
|
36
37
|
return undefined;
|
|
@@ -46,4 +47,3 @@ function ListPlatformsResponseToJSON(value) {
|
|
|
46
47
|
'version': value.version,
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
exports.ListPlatformsResponseToJSON = ListPlatformsResponseToJSON;
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ListTasksResponseFromJSON = ListTasksResponseFromJSON;
|
|
17
|
+
exports.ListTasksResponseFromJSONTyped = ListTasksResponseFromJSONTyped;
|
|
18
|
+
exports.ListTasksResponseToJSON = ListTasksResponseToJSON;
|
|
16
19
|
var _1 = require("./");
|
|
17
20
|
function ListTasksResponseFromJSON(json) {
|
|
18
21
|
return ListTasksResponseFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.ListTasksResponseFromJSON = ListTasksResponseFromJSON;
|
|
21
23
|
function ListTasksResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
@@ -30,7 +32,6 @@ function ListTasksResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
32
|
'version': json['version'],
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
exports.ListTasksResponseFromJSONTyped = ListTasksResponseFromJSONTyped;
|
|
34
35
|
function ListTasksResponseToJSON(value) {
|
|
35
36
|
if (value === undefined) {
|
|
36
37
|
return undefined;
|
|
@@ -46,4 +47,3 @@ function ListTasksResponseToJSON(value) {
|
|
|
46
47
|
'version': value.version,
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
exports.ListTasksResponseToJSON = ListTasksResponseToJSON;
|
|
@@ -45,7 +45,7 @@ export interface ModelArtifact {
|
|
|
45
45
|
* @type {ModelMetadata}
|
|
46
46
|
* @memberof ModelArtifact
|
|
47
47
|
*/
|
|
48
|
-
metadata?: ModelMetadata
|
|
48
|
+
metadata?: ModelMetadata;
|
|
49
49
|
}
|
|
50
50
|
export declare function ModelArtifactFromJSON(json: any): ModelArtifact;
|
|
51
51
|
export declare function ModelArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelArtifact;
|
|
@@ -13,25 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ModelArtifactFromJSON = ModelArtifactFromJSON;
|
|
17
|
+
exports.ModelArtifactFromJSONTyped = ModelArtifactFromJSONTyped;
|
|
18
|
+
exports.ModelArtifactToJSON = ModelArtifactToJSON;
|
|
16
19
|
var runtime_1 = require("../runtime");
|
|
17
20
|
var _1 = require("./");
|
|
18
21
|
function ModelArtifactFromJSON(json) {
|
|
19
22
|
return ModelArtifactFromJSONTyped(json, false);
|
|
20
23
|
}
|
|
21
|
-
exports.ModelArtifactFromJSON = ModelArtifactFromJSON;
|
|
22
24
|
function ModelArtifactFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
25
|
if ((json === undefined) || (json === null)) {
|
|
24
26
|
return json;
|
|
25
27
|
}
|
|
26
28
|
return {
|
|
27
|
-
'artifact_type': _1.ArtifactTypeFromJSON(json['artifact_type']),
|
|
29
|
+
'artifact_type': (0, _1.ArtifactTypeFromJSON)(json['artifact_type']),
|
|
28
30
|
'created_at': json['created_at'],
|
|
29
31
|
'id': json['id'],
|
|
30
32
|
'last_modified': json['last_modified'],
|
|
31
|
-
'metadata': !runtime_1.exists(json, 'metadata') ? undefined : _1.ModelMetadataFromJSON(json['metadata']),
|
|
33
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, _1.ModelMetadataFromJSON)(json['metadata']),
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
|
-
exports.ModelArtifactFromJSONTyped = ModelArtifactFromJSONTyped;
|
|
35
36
|
function ModelArtifactToJSON(value) {
|
|
36
37
|
if (value === undefined) {
|
|
37
38
|
return undefined;
|
|
@@ -40,11 +41,10 @@ function ModelArtifactToJSON(value) {
|
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
43
|
return {
|
|
43
|
-
'artifact_type': _1.ArtifactTypeToJSON(value.artifact_type),
|
|
44
|
+
'artifact_type': (0, _1.ArtifactTypeToJSON)(value.artifact_type),
|
|
44
45
|
'created_at': value.created_at,
|
|
45
46
|
'id': value.id,
|
|
46
47
|
'last_modified': value.last_modified,
|
|
47
|
-
'metadata': _1.ModelMetadataToJSON(value.metadata),
|
|
48
|
+
'metadata': (0, _1.ModelMetadataToJSON)(value.metadata),
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
exports.ModelArtifactToJSON = ModelArtifactToJSON;
|
package/dist/models/ModelIO.js
CHANGED
|
@@ -13,21 +13,22 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ModelIOFromJSON = ModelIOFromJSON;
|
|
17
|
+
exports.ModelIOFromJSONTyped = ModelIOFromJSONTyped;
|
|
18
|
+
exports.ModelIOToJSON = ModelIOToJSON;
|
|
16
19
|
var runtime_1 = require("../runtime");
|
|
17
20
|
function ModelIOFromJSON(json) {
|
|
18
21
|
return ModelIOFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.ModelIOFromJSON = ModelIOFromJSON;
|
|
21
23
|
function ModelIOFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
24
26
|
}
|
|
25
27
|
return {
|
|
26
|
-
'data_type': !runtime_1.exists(json, 'data_type') ? undefined : json['data_type'],
|
|
27
|
-
'shape': !runtime_1.exists(json, 'shape') ? undefined : json['shape'],
|
|
28
|
+
'data_type': !(0, runtime_1.exists)(json, 'data_type') ? undefined : json['data_type'],
|
|
29
|
+
'shape': !(0, runtime_1.exists)(json, 'shape') ? undefined : json['shape'],
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
exports.ModelIOFromJSONTyped = ModelIOFromJSONTyped;
|
|
31
32
|
function ModelIOToJSON(value) {
|
|
32
33
|
if (value === undefined) {
|
|
33
34
|
return undefined;
|
|
@@ -40,4 +41,3 @@ function ModelIOToJSON(value) {
|
|
|
40
41
|
'shape': value.shape,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
exports.ModelIOToJSON = ModelIOToJSON;
|
|
@@ -63,7 +63,7 @@ export interface ModelMetadata {
|
|
|
63
63
|
* @type {HardwareRequirements}
|
|
64
64
|
* @memberof ModelMetadata
|
|
65
65
|
*/
|
|
66
|
-
inference_hardware?: HardwareRequirements
|
|
66
|
+
inference_hardware?: HardwareRequirements;
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @type {number}
|
|
@@ -214,7 +214,7 @@ export interface ModelMetadata {
|
|
|
214
214
|
* @type {HardwareRequirements}
|
|
215
215
|
* @memberof ModelMetadata
|
|
216
216
|
*/
|
|
217
|
-
training_hardware?: HardwareRequirements
|
|
217
|
+
training_hardware?: HardwareRequirements;
|
|
218
218
|
/**
|
|
219
219
|
* Training performance fields
|
|
220
220
|
* @type {number}
|
|
@@ -13,56 +13,57 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ModelMetadataFromJSON = ModelMetadataFromJSON;
|
|
17
|
+
exports.ModelMetadataFromJSONTyped = ModelMetadataFromJSONTyped;
|
|
18
|
+
exports.ModelMetadataToJSON = ModelMetadataToJSON;
|
|
16
19
|
var runtime_1 = require("../runtime");
|
|
17
20
|
var _1 = require("./");
|
|
18
21
|
function ModelMetadataFromJSON(json) {
|
|
19
22
|
return ModelMetadataFromJSONTyped(json, false);
|
|
20
23
|
}
|
|
21
|
-
exports.ModelMetadataFromJSON = ModelMetadataFromJSON;
|
|
22
24
|
function ModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
25
|
if ((json === undefined) || (json === null)) {
|
|
24
26
|
return json;
|
|
25
27
|
}
|
|
26
28
|
return {
|
|
27
|
-
'annotations': !runtime_1.exists(json, 'annotations') ? undefined : json['annotations'],
|
|
28
|
-
'author': !runtime_1.exists(json, 'author') ? undefined : json['author'],
|
|
29
|
-
'bias_evaluation_score': !runtime_1.exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
30
|
-
'edge_optimized': !runtime_1.exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
31
|
-
'finetuning_datasets': !runtime_1.exists(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
32
|
-
'image': !runtime_1.exists(json, 'image') ? undefined : json['image'],
|
|
33
|
-
'inference_distributed': !runtime_1.exists(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
34
|
-
'inference_hardware': !runtime_1.exists(json, 'inference_hardware') ? undefined : _1.HardwareRequirementsFromJSON(json['inference_hardware']),
|
|
35
|
-
'inference_max_compute_utilization_percentage': !runtime_1.exists(json, 'inference_max_compute_utilization_percentage') ? undefined : json['inference_max_compute_utilization_percentage'],
|
|
36
|
-
'inference_max_energy_consumption_watts': !runtime_1.exists(json, 'inference_max_energy_consumption_watts') ? undefined : json['inference_max_energy_consumption_watts'],
|
|
37
|
-
'inference_max_latency_ms': !runtime_1.exists(json, 'inference_max_latency_ms') ? undefined : json['inference_max_latency_ms'],
|
|
38
|
-
'inference_max_memory_usage_mb': !runtime_1.exists(json, 'inference_max_memory_usage_mb') ? undefined : json['inference_max_memory_usage_mb'],
|
|
39
|
-
'inference_min_throughput': !runtime_1.exists(json, 'inference_min_throughput') ? undefined : json['inference_min_throughput'],
|
|
40
|
-
'inference_precision': !runtime_1.exists(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
41
|
-
'inference_software_dependencies': !runtime_1.exists(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
42
|
-
'keywords': !runtime_1.exists(json, 'keywords') ? undefined : json['keywords'],
|
|
43
|
-
'libraries': !runtime_1.exists(json, 'libraries') ? undefined : json['libraries'],
|
|
44
|
-
'license': !runtime_1.exists(json, 'license') ? undefined : json['license'],
|
|
45
|
-
'model_inputs': !runtime_1.exists(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : json['model_inputs'].map(_1.ModelIOFromJSON)),
|
|
46
|
-
'model_outputs': !runtime_1.exists(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : json['model_outputs'].map(_1.ModelIOFromJSON)),
|
|
47
|
-
'model_type': !runtime_1.exists(json, 'model_type') ? undefined : json['model_type'],
|
|
48
|
-
'multi_modal': !runtime_1.exists(json, 'multi_modal') ? undefined : json['multi_modal'],
|
|
49
|
-
'name': !runtime_1.exists(json, 'name') ? undefined : json['name'],
|
|
50
|
-
'pretrained': !runtime_1.exists(json, 'pretrained') ? undefined : json['pretrained'],
|
|
51
|
-
'pretraining_datasets': !runtime_1.exists(json, 'pretraining_datasets') ? undefined : json['pretraining_datasets'],
|
|
52
|
-
'pruned': !runtime_1.exists(json, 'pruned') ? undefined : json['pruned'],
|
|
53
|
-
'quantization_aware': !runtime_1.exists(json, 'quantization_aware') ? undefined : json['quantization_aware'],
|
|
54
|
-
'regulatory': !runtime_1.exists(json, 'regulatory') ? undefined : json['regulatory'],
|
|
55
|
-
'slimmed': !runtime_1.exists(json, 'slimmed') ? undefined : json['slimmed'],
|
|
56
|
-
'supports_quantization': !runtime_1.exists(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
57
|
-
'task_types': !runtime_1.exists(json, 'task_types') ? undefined : (json['task_types'] === null ? null : json['task_types'].map(_1.TaskFromJSON)),
|
|
58
|
-
'training_distributed': !runtime_1.exists(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
59
|
-
'training_hardware': !runtime_1.exists(json, 'training_hardware') ? undefined : _1.HardwareRequirementsFromJSON(json['training_hardware']),
|
|
60
|
-
'training_max_energy_consumption_watts': !runtime_1.exists(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
61
|
-
'training_precision': !runtime_1.exists(json, 'training_precision') ? undefined : json['training_precision'],
|
|
62
|
-
'training_time': !runtime_1.exists(json, 'training_time') ? undefined : json['training_time'],
|
|
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
|
+
'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'],
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
exports.ModelMetadataFromJSONTyped = ModelMetadataFromJSONTyped;
|
|
66
67
|
function ModelMetadataToJSON(value) {
|
|
67
68
|
if (value === undefined) {
|
|
68
69
|
return undefined;
|
|
@@ -78,7 +79,7 @@ function ModelMetadataToJSON(value) {
|
|
|
78
79
|
'finetuning_datasets': value.finetuning_datasets,
|
|
79
80
|
'image': value.image,
|
|
80
81
|
'inference_distributed': value.inference_distributed,
|
|
81
|
-
'inference_hardware': _1.HardwareRequirementsToJSON(value.inference_hardware),
|
|
82
|
+
'inference_hardware': (0, _1.HardwareRequirementsToJSON)(value.inference_hardware),
|
|
82
83
|
'inference_max_compute_utilization_percentage': value.inference_max_compute_utilization_percentage,
|
|
83
84
|
'inference_max_energy_consumption_watts': value.inference_max_energy_consumption_watts,
|
|
84
85
|
'inference_max_latency_ms': value.inference_max_latency_ms,
|
|
@@ -103,10 +104,9 @@ function ModelMetadataToJSON(value) {
|
|
|
103
104
|
'supports_quantization': value.supports_quantization,
|
|
104
105
|
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : value.task_types.map(_1.TaskToJSON)),
|
|
105
106
|
'training_distributed': value.training_distributed,
|
|
106
|
-
'training_hardware': _1.HardwareRequirementsToJSON(value.training_hardware),
|
|
107
|
+
'training_hardware': (0, _1.HardwareRequirementsToJSON)(value.training_hardware),
|
|
107
108
|
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
|
108
109
|
'training_precision': value.training_precision,
|
|
109
110
|
'training_time': value.training_time,
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
|
-
exports.ModelMetadataToJSON = ModelMetadataToJSON;
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.NotFoundResponseFromJSON = NotFoundResponseFromJSON;
|
|
17
|
+
exports.NotFoundResponseFromJSONTyped = NotFoundResponseFromJSONTyped;
|
|
18
|
+
exports.NotFoundResponseToJSON = NotFoundResponseToJSON;
|
|
16
19
|
function NotFoundResponseFromJSON(json) {
|
|
17
20
|
return NotFoundResponseFromJSONTyped(json, false);
|
|
18
21
|
}
|
|
19
|
-
exports.NotFoundResponseFromJSON = NotFoundResponseFromJSON;
|
|
20
22
|
function NotFoundResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
21
23
|
if ((json === undefined) || (json === null)) {
|
|
22
24
|
return json;
|
|
@@ -29,7 +31,6 @@ function NotFoundResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
31
|
'version': json['version'],
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
|
-
exports.NotFoundResponseFromJSONTyped = NotFoundResponseFromJSONTyped;
|
|
33
34
|
function NotFoundResponseToJSON(value) {
|
|
34
35
|
if (value === undefined) {
|
|
35
36
|
return undefined;
|
|
@@ -45,4 +46,3 @@ function NotFoundResponseToJSON(value) {
|
|
|
45
46
|
'version': value.version,
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
exports.NotFoundResponseToJSON = NotFoundResponseToJSON;
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
* @enum {string}
|
|
19
19
|
*/
|
|
20
20
|
export declare enum Platform {
|
|
21
|
-
|
|
21
|
+
HuggingFace = "hugging-face",
|
|
22
22
|
Github = "github",
|
|
23
23
|
Git = "git",
|
|
24
24
|
Patra = "patra",
|
|
25
|
-
|
|
25
|
+
TapisPods = "tapis-pods",
|
|
26
|
+
TapisJobs = "tapis-jobs",
|
|
26
27
|
S3 = "s3"
|
|
27
28
|
}
|
|
28
29
|
export declare function PlatformFromJSON(json: any): Platform;
|
package/dist/models/Platform.js
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.Platform = void 0;
|
|
17
|
+
exports.PlatformFromJSON = PlatformFromJSON;
|
|
18
|
+
exports.PlatformFromJSONTyped = PlatformFromJSONTyped;
|
|
19
|
+
exports.PlatformToJSON = PlatformToJSON;
|
|
16
20
|
/**
|
|
17
21
|
* Represents a platform for which there are clients registered for one or more of
|
|
18
22
|
* the following APIs: Models, Datasets, Inference, Training. The strum(serialize="")
|
|
@@ -23,22 +27,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
27
|
*/
|
|
24
28
|
var Platform;
|
|
25
29
|
(function (Platform) {
|
|
26
|
-
Platform["
|
|
30
|
+
Platform["HuggingFace"] = "hugging-face";
|
|
27
31
|
Platform["Github"] = "github";
|
|
28
32
|
Platform["Git"] = "git";
|
|
29
33
|
Platform["Patra"] = "patra";
|
|
30
|
-
Platform["
|
|
34
|
+
Platform["TapisPods"] = "tapis-pods";
|
|
35
|
+
Platform["TapisJobs"] = "tapis-jobs";
|
|
31
36
|
Platform["S3"] = "s3";
|
|
32
|
-
})(Platform
|
|
37
|
+
})(Platform || (exports.Platform = Platform = {}));
|
|
33
38
|
function PlatformFromJSON(json) {
|
|
34
39
|
return PlatformFromJSONTyped(json, false);
|
|
35
40
|
}
|
|
36
|
-
exports.PlatformFromJSON = PlatformFromJSON;
|
|
37
41
|
function PlatformFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
42
|
return json;
|
|
39
43
|
}
|
|
40
|
-
exports.PlatformFromJSONTyped = PlatformFromJSONTyped;
|
|
41
44
|
function PlatformToJSON(value) {
|
|
42
45
|
return value;
|
|
43
46
|
}
|
|
44
|
-
exports.PlatformToJSON = PlatformToJSON;
|
|
@@ -13,21 +13,22 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PlatformDetailsFromJSON = PlatformDetailsFromJSON;
|
|
17
|
+
exports.PlatformDetailsFromJSONTyped = PlatformDetailsFromJSONTyped;
|
|
18
|
+
exports.PlatformDetailsToJSON = PlatformDetailsToJSON;
|
|
16
19
|
var _1 = require("./");
|
|
17
20
|
function PlatformDetailsFromJSON(json) {
|
|
18
21
|
return PlatformDetailsFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.PlatformDetailsFromJSON = PlatformDetailsFromJSON;
|
|
21
23
|
function PlatformDetailsFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
24
26
|
}
|
|
25
27
|
return {
|
|
26
28
|
'capabilities': json['capabilities'],
|
|
27
|
-
'name': _1.PlatformFromJSON(json['name']),
|
|
29
|
+
'name': (0, _1.PlatformFromJSON)(json['name']),
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
exports.PlatformDetailsFromJSONTyped = PlatformDetailsFromJSONTyped;
|
|
31
32
|
function PlatformDetailsToJSON(value) {
|
|
32
33
|
if (value === undefined) {
|
|
33
34
|
return undefined;
|
|
@@ -37,7 +38,6 @@ function PlatformDetailsToJSON(value) {
|
|
|
37
38
|
}
|
|
38
39
|
return {
|
|
39
40
|
'capabilities': value.capabilities,
|
|
40
|
-
'name': _1.PlatformToJSON(value.name),
|
|
41
|
+
'name': (0, _1.PlatformToJSON)(value.name),
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
exports.PlatformDetailsToJSON = PlatformDetailsToJSON;
|
|
@@ -13,21 +13,22 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PublishArtifactRequestFromJSON = PublishArtifactRequestFromJSON;
|
|
17
|
+
exports.PublishArtifactRequestFromJSONTyped = PublishArtifactRequestFromJSONTyped;
|
|
18
|
+
exports.PublishArtifactRequestToJSON = PublishArtifactRequestToJSON;
|
|
16
19
|
var runtime_1 = require("../runtime");
|
|
17
20
|
function PublishArtifactRequestFromJSON(json) {
|
|
18
21
|
return PublishArtifactRequestFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.PublishArtifactRequestFromJSON = PublishArtifactRequestFromJSON;
|
|
21
23
|
function PublishArtifactRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
24
26
|
}
|
|
25
27
|
return {
|
|
26
28
|
'target_platform': json['target_platform'],
|
|
27
|
-
'webhook_url': !runtime_1.exists(json, 'webhook_url') ? undefined : json['webhook_url'],
|
|
29
|
+
'webhook_url': !(0, runtime_1.exists)(json, 'webhook_url') ? undefined : json['webhook_url'],
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
exports.PublishArtifactRequestFromJSONTyped = PublishArtifactRequestFromJSONTyped;
|
|
31
32
|
function PublishArtifactRequestToJSON(value) {
|
|
32
33
|
if (value === undefined) {
|
|
33
34
|
return undefined;
|
|
@@ -40,4 +41,3 @@ function PublishArtifactRequestToJSON(value) {
|
|
|
40
41
|
'webhook_url': value.webhook_url,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
exports.PublishArtifactRequestToJSON = PublishArtifactRequestToJSON;
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PublishModelArtifactResponseFromJSON = PublishModelArtifactResponseFromJSON;
|
|
17
|
+
exports.PublishModelArtifactResponseFromJSONTyped = PublishModelArtifactResponseFromJSONTyped;
|
|
18
|
+
exports.PublishModelArtifactResponseToJSON = PublishModelArtifactResponseToJSON;
|
|
16
19
|
var _1 = require("./");
|
|
17
20
|
function PublishModelArtifactResponseFromJSON(json) {
|
|
18
21
|
return PublishModelArtifactResponseFromJSONTyped(json, false);
|
|
19
22
|
}
|
|
20
|
-
exports.PublishModelArtifactResponseFromJSON = PublishModelArtifactResponseFromJSON;
|
|
21
23
|
function PublishModelArtifactResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
24
|
if ((json === undefined) || (json === null)) {
|
|
23
25
|
return json;
|
|
@@ -25,12 +27,11 @@ function PublishModelArtifactResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
25
27
|
return {
|
|
26
28
|
'message': json['message'],
|
|
27
29
|
'metadata': json['metadata'],
|
|
28
|
-
'result': _1.ArtifactPublicationFromJSON(json['result']),
|
|
30
|
+
'result': (0, _1.ArtifactPublicationFromJSON)(json['result']),
|
|
29
31
|
'status': json['status'],
|
|
30
32
|
'version': json['version'],
|
|
31
33
|
};
|
|
32
34
|
}
|
|
33
|
-
exports.PublishModelArtifactResponseFromJSONTyped = PublishModelArtifactResponseFromJSONTyped;
|
|
34
35
|
function PublishModelArtifactResponseToJSON(value) {
|
|
35
36
|
if (value === undefined) {
|
|
36
37
|
return undefined;
|
|
@@ -41,9 +42,8 @@ function PublishModelArtifactResponseToJSON(value) {
|
|
|
41
42
|
return {
|
|
42
43
|
'message': value.message,
|
|
43
44
|
'metadata': value.metadata,
|
|
44
|
-
'result': _1.ArtifactPublicationToJSON(value.result),
|
|
45
|
+
'result': (0, _1.ArtifactPublicationToJSON)(value.result),
|
|
45
46
|
'status': value.status,
|
|
46
47
|
'version': value.version,
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
exports.PublishModelArtifactResponseToJSON = PublishModelArtifactResponseToJSON;
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ServerErrorResponseFromJSON = ServerErrorResponseFromJSON;
|
|
17
|
+
exports.ServerErrorResponseFromJSONTyped = ServerErrorResponseFromJSONTyped;
|
|
18
|
+
exports.ServerErrorResponseToJSON = ServerErrorResponseToJSON;
|
|
16
19
|
function ServerErrorResponseFromJSON(json) {
|
|
17
20
|
return ServerErrorResponseFromJSONTyped(json, false);
|
|
18
21
|
}
|
|
19
|
-
exports.ServerErrorResponseFromJSON = ServerErrorResponseFromJSON;
|
|
20
22
|
function ServerErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
21
23
|
if ((json === undefined) || (json === null)) {
|
|
22
24
|
return json;
|
|
@@ -29,7 +31,6 @@ function ServerErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
31
|
'version': json['version'],
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
|
-
exports.ServerErrorResponseFromJSONTyped = ServerErrorResponseFromJSONTyped;
|
|
33
34
|
function ServerErrorResponseToJSON(value) {
|
|
34
35
|
if (value === undefined) {
|
|
35
36
|
return undefined;
|
|
@@ -45,4 +46,3 @@ function ServerErrorResponseToJSON(value) {
|
|
|
45
46
|
'version': value.version,
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
exports.ServerErrorResponseToJSON = ServerErrorResponseToJSON;
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SystemRequirementFromJSON = SystemRequirementFromJSON;
|
|
17
|
+
exports.SystemRequirementFromJSONTyped = SystemRequirementFromJSONTyped;
|
|
18
|
+
exports.SystemRequirementToJSON = SystemRequirementToJSON;
|
|
16
19
|
function SystemRequirementFromJSON(json) {
|
|
17
20
|
return SystemRequirementFromJSONTyped(json, false);
|
|
18
21
|
}
|
|
19
|
-
exports.SystemRequirementFromJSON = SystemRequirementFromJSON;
|
|
20
22
|
function SystemRequirementFromJSONTyped(json, ignoreDiscriminator) {
|
|
21
23
|
if ((json === undefined) || (json === null)) {
|
|
22
24
|
return json;
|
|
@@ -26,7 +28,6 @@ function SystemRequirementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
28
|
'version': json['version'],
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
|
-
exports.SystemRequirementFromJSONTyped = SystemRequirementFromJSONTyped;
|
|
30
31
|
function SystemRequirementToJSON(value) {
|
|
31
32
|
if (value === undefined) {
|
|
32
33
|
return undefined;
|
|
@@ -39,4 +40,3 @@ function SystemRequirementToJSON(value) {
|
|
|
39
40
|
'version': value.version,
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
exports.SystemRequirementToJSON = SystemRequirementToJSON;
|
package/dist/models/Task.js
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.Task = void 0;
|
|
17
|
+
exports.TaskFromJSON = TaskFromJSON;
|
|
18
|
+
exports.TaskFromJSONTyped = TaskFromJSONTyped;
|
|
19
|
+
exports.TaskToJSON = TaskToJSON;
|
|
16
20
|
/**
|
|
17
21
|
* An enum of all task types available on Huggingface
|
|
18
22
|
* @export
|
|
@@ -65,16 +69,13 @@ var Task;
|
|
|
65
69
|
Task["ZeroShotObjectDetection"] = "ZeroShotObjectDetection";
|
|
66
70
|
Task["TextTo3d"] = "TextTo3d";
|
|
67
71
|
Task["ImageTo3d"] = "ImageTo3d";
|
|
68
|
-
})(Task
|
|
72
|
+
})(Task || (exports.Task = Task = {}));
|
|
69
73
|
function TaskFromJSON(json) {
|
|
70
74
|
return TaskFromJSONTyped(json, false);
|
|
71
75
|
}
|
|
72
|
-
exports.TaskFromJSON = TaskFromJSON;
|
|
73
76
|
function TaskFromJSONTyped(json, ignoreDiscriminator) {
|
|
74
77
|
return json;
|
|
75
78
|
}
|
|
76
|
-
exports.TaskFromJSONTyped = TaskFromJSONTyped;
|
|
77
79
|
function TaskToJSON(value) {
|
|
78
80
|
return value;
|
|
79
81
|
}
|
|
80
|
-
exports.TaskToJSON = TaskToJSON;
|