@mlhub/models-ts-sdk 0.0.0 → 0.0.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/.openapi-generator/FILES +11 -1
- package/README.md +2 -2
- package/dist/apis/ArtifactsApi.d.ts +13 -1
- package/dist/apis/ArtifactsApi.js +49 -0
- package/dist/apis/ModelsApi.d.ts +74 -0
- package/dist/apis/ModelsApi.js +302 -0
- package/dist/apis/TasksApi.d.ts +26 -0
- package/dist/apis/{MetadataApi.js → TasksApi.js} +13 -21
- package/dist/apis/index.d.ts +2 -1
- package/dist/apis/index.js +2 -1
- package/dist/models/AssociateModelMetadata.d.ts +33 -0
- package/dist/models/AssociateModelMetadata.js +42 -0
- package/dist/models/AssociateModelMetadataResponse.d.ts +51 -0
- package/dist/models/AssociateModelMetadataResponse.js +48 -0
- package/dist/models/DiscoverModelsResponse.d.ts +51 -0
- package/dist/models/DiscoverModelsResponse.js +48 -0
- package/dist/models/DiscoveryCriteria.d.ts +11 -5
- package/dist/models/DiscoveryCriteria.js +4 -2
- package/dist/models/DiscoveryCriterion.d.ts +245 -0
- package/dist/models/DiscoveryCriterion.js +114 -0
- package/dist/models/GetModelArtifactResponse.d.ts +3 -3
- package/dist/models/GetModelArtifactResponse.js +2 -2
- package/dist/models/GetModelResponse.d.ts +51 -0
- package/dist/models/GetModelResponse.js +48 -0
- package/dist/models/ListModelsResponse.d.ts +51 -0
- package/dist/models/ListModelsResponse.js +48 -0
- package/dist/models/ListTasksResponse.d.ts +52 -0
- package/dist/models/ListTasksResponse.js +49 -0
- package/dist/models/ModelArtifact.d.ts +52 -0
- package/dist/models/ModelArtifact.js +50 -0
- package/dist/models/ModelMetadata.d.ts +15 -15
- package/dist/models/ModelMetadata.js +6 -6
- package/dist/models/Task.d.ts +66 -0
- package/dist/models/Task.js +80 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/package.json +1 -1
- package/src/apis/ArtifactsApi.ts +48 -0
- package/src/apis/ModelsApi.ts +236 -0
- package/src/apis/TasksApi.ts +63 -0
- package/src/apis/index.ts +2 -1
- package/src/models/AssociateModelMetadata.ts +64 -0
- package/src/models/AssociateModelMetadataResponse.ts +88 -0
- package/src/models/DiscoverModelsResponse.ts +88 -0
- package/src/models/DiscoveryCriteria.ts +18 -10
- package/src/models/DiscoveryCriterion.ts +360 -0
- package/src/models/GetModelArtifactResponse.ts +8 -8
- package/src/models/GetModelResponse.ts +88 -0
- package/src/models/ListModelsResponse.ts +88 -0
- package/src/models/ListTasksResponse.ts +95 -0
- package/src/models/ModelArtifact.ts +99 -0
- package/src/models/ModelMetadata.ts +24 -20
- package/src/models/Task.ts +79 -0
- package/src/models/index.ts +9 -0
- package/dist/apis/MetadataApi.d.ts +0 -30
- package/src/apis/MetadataApi.ts +0 -82
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
ModelArtifact,
|
|
18
|
+
ModelArtifactFromJSON,
|
|
19
|
+
ModelArtifactFromJSONTyped,
|
|
20
|
+
ModelArtifactToJSON,
|
|
21
21
|
} from './';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -40,10 +40,10 @@ export interface GetModelArtifactResponse {
|
|
|
40
40
|
metadata: object;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
|
-
* @type {
|
|
43
|
+
* @type {ModelArtifact}
|
|
44
44
|
* @memberof GetModelArtifactResponse
|
|
45
45
|
*/
|
|
46
|
-
result:
|
|
46
|
+
result: ModelArtifact;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {number}
|
|
@@ -70,7 +70,7 @@ export function GetModelArtifactResponseFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
70
70
|
|
|
71
71
|
'message': json['message'],
|
|
72
72
|
'metadata': json['metadata'],
|
|
73
|
-
'result':
|
|
73
|
+
'result': ModelArtifactFromJSON(json['result']),
|
|
74
74
|
'status': json['status'],
|
|
75
75
|
'version': json['version'],
|
|
76
76
|
};
|
|
@@ -87,7 +87,7 @@ export function GetModelArtifactResponseToJSON(value?: GetModelArtifactResponse
|
|
|
87
87
|
|
|
88
88
|
'message': value.message,
|
|
89
89
|
'metadata': value.metadata,
|
|
90
|
-
'result':
|
|
90
|
+
'result': ModelArtifactToJSON(value.result),
|
|
91
91
|
'status': value.status,
|
|
92
92
|
'version': value.version,
|
|
93
93
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetModelResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface GetModelResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetModelResponse
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof GetModelResponse
|
|
32
|
+
*/
|
|
33
|
+
metadata: object;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof GetModelResponse
|
|
38
|
+
*/
|
|
39
|
+
result: object;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof GetModelResponse
|
|
44
|
+
*/
|
|
45
|
+
status: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetModelResponse
|
|
50
|
+
*/
|
|
51
|
+
version: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function GetModelResponseFromJSON(json: any): GetModelResponse {
|
|
55
|
+
return GetModelResponseFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GetModelResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetModelResponse {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'message': json['message'],
|
|
65
|
+
'metadata': json['metadata'],
|
|
66
|
+
'result': json['result'],
|
|
67
|
+
'status': json['status'],
|
|
68
|
+
'version': json['version'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function GetModelResponseToJSON(value?: GetModelResponse | null): any {
|
|
73
|
+
if (value === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
if (value === null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'message': value.message,
|
|
82
|
+
'metadata': value.metadata,
|
|
83
|
+
'result': value.result,
|
|
84
|
+
'status': value.status,
|
|
85
|
+
'version': value.version,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ListModelsResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ListModelsResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ListModelsResponse
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof ListModelsResponse
|
|
32
|
+
*/
|
|
33
|
+
metadata: object;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {object}
|
|
37
|
+
* @memberof ListModelsResponse
|
|
38
|
+
*/
|
|
39
|
+
result: object;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ListModelsResponse
|
|
44
|
+
*/
|
|
45
|
+
status: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ListModelsResponse
|
|
50
|
+
*/
|
|
51
|
+
version: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ListModelsResponseFromJSON(json: any): ListModelsResponse {
|
|
55
|
+
return ListModelsResponseFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ListModelsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListModelsResponse {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'message': json['message'],
|
|
65
|
+
'metadata': json['metadata'],
|
|
66
|
+
'result': json['result'],
|
|
67
|
+
'status': json['status'],
|
|
68
|
+
'version': json['version'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ListModelsResponseToJSON(value?: ListModelsResponse | null): any {
|
|
73
|
+
if (value === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
if (value === null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'message': value.message,
|
|
82
|
+
'metadata': value.metadata,
|
|
83
|
+
'result': value.result,
|
|
84
|
+
'status': value.status,
|
|
85
|
+
'version': value.version,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
Task,
|
|
18
|
+
TaskFromJSON,
|
|
19
|
+
TaskFromJSONTyped,
|
|
20
|
+
TaskToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ListTasksResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface ListTasksResponse {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ListTasksResponse
|
|
33
|
+
*/
|
|
34
|
+
message: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {object}
|
|
38
|
+
* @memberof ListTasksResponse
|
|
39
|
+
*/
|
|
40
|
+
metadata: object;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<Task>}
|
|
44
|
+
* @memberof ListTasksResponse
|
|
45
|
+
*/
|
|
46
|
+
result: Array<Task>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof ListTasksResponse
|
|
51
|
+
*/
|
|
52
|
+
status: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof ListTasksResponse
|
|
57
|
+
*/
|
|
58
|
+
version: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function ListTasksResponseFromJSON(json: any): ListTasksResponse {
|
|
62
|
+
return ListTasksResponseFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ListTasksResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListTasksResponse {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'message': json['message'],
|
|
72
|
+
'metadata': json['metadata'],
|
|
73
|
+
'result': ((json['result'] as Array<any>).map(TaskFromJSON)),
|
|
74
|
+
'status': json['status'],
|
|
75
|
+
'version': json['version'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ListTasksResponseToJSON(value?: ListTasksResponse | null): any {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'message': value.message,
|
|
89
|
+
'metadata': value.metadata,
|
|
90
|
+
'result': ((value.result as Array<any>).map(TaskToJSON)),
|
|
91
|
+
'status': value.status,
|
|
92
|
+
'version': value.version,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
ArtifactType,
|
|
18
|
+
ArtifactTypeFromJSON,
|
|
19
|
+
ArtifactTypeFromJSONTyped,
|
|
20
|
+
ArtifactTypeToJSON,
|
|
21
|
+
ModelMetadata,
|
|
22
|
+
ModelMetadataFromJSON,
|
|
23
|
+
ModelMetadataFromJSONTyped,
|
|
24
|
+
ModelMetadataToJSON,
|
|
25
|
+
} from './';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @interface ModelArtifact
|
|
31
|
+
*/
|
|
32
|
+
export interface ModelArtifact {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {ArtifactType}
|
|
36
|
+
* @memberof ModelArtifact
|
|
37
|
+
*/
|
|
38
|
+
artifact_type: ArtifactType;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof ModelArtifact
|
|
43
|
+
*/
|
|
44
|
+
created_at: string;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof ModelArtifact
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ModelArtifact
|
|
55
|
+
*/
|
|
56
|
+
last_modified: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {ModelMetadata}
|
|
60
|
+
* @memberof ModelArtifact
|
|
61
|
+
*/
|
|
62
|
+
metadata?: ModelMetadata | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ModelArtifactFromJSON(json: any): ModelArtifact {
|
|
66
|
+
return ModelArtifactFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ModelArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelArtifact {
|
|
70
|
+
if ((json === undefined) || (json === null)) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'artifact_type': ArtifactTypeFromJSON(json['artifact_type']),
|
|
76
|
+
'created_at': json['created_at'],
|
|
77
|
+
'id': json['id'],
|
|
78
|
+
'last_modified': json['last_modified'],
|
|
79
|
+
'metadata': !exists(json, 'metadata') ? undefined : ModelMetadataFromJSON(json['metadata']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ModelArtifactToJSON(value?: ModelArtifact | null): any {
|
|
84
|
+
if (value === undefined) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'artifact_type': ArtifactTypeToJSON(value.artifact_type),
|
|
93
|
+
'created_at': value.created_at,
|
|
94
|
+
'id': value.id,
|
|
95
|
+
'last_modified': value.last_modified,
|
|
96
|
+
'metadata': ModelMetadataToJSON(value.metadata),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -22,6 +22,10 @@ import {
|
|
|
22
22
|
ModelIOFromJSON,
|
|
23
23
|
ModelIOFromJSONTyped,
|
|
24
24
|
ModelIOToJSON,
|
|
25
|
+
Task,
|
|
26
|
+
TaskFromJSON,
|
|
27
|
+
TaskFromJSONTyped,
|
|
28
|
+
TaskToJSON,
|
|
25
29
|
} from './';
|
|
26
30
|
|
|
27
31
|
/**
|
|
@@ -36,6 +40,12 @@ export interface ModelMetadata {
|
|
|
36
40
|
* @memberof ModelMetadata
|
|
37
41
|
*/
|
|
38
42
|
annotation?: any | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ModelMetadata
|
|
47
|
+
*/
|
|
48
|
+
author?: string | null;
|
|
39
49
|
/**
|
|
40
50
|
*
|
|
41
51
|
* @type {number}
|
|
@@ -54,12 +64,6 @@ export interface ModelMetadata {
|
|
|
54
64
|
* @memberof ModelMetadata
|
|
55
65
|
*/
|
|
56
66
|
finetuning_datasets?: Array<string> | null;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @type {string}
|
|
60
|
-
* @memberof ModelMetadata
|
|
61
|
-
*/
|
|
62
|
-
framework?: string | null;
|
|
63
67
|
/**
|
|
64
68
|
*
|
|
65
69
|
* @type {string}
|
|
@@ -126,6 +130,12 @@ export interface ModelMetadata {
|
|
|
126
130
|
* @memberof ModelMetadata
|
|
127
131
|
*/
|
|
128
132
|
keywords?: Array<string> | null;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {Array<string>}
|
|
136
|
+
* @memberof ModelMetadata
|
|
137
|
+
*/
|
|
138
|
+
libraries?: Array<string> | null;
|
|
129
139
|
/**
|
|
130
140
|
*
|
|
131
141
|
* @type {string}
|
|
@@ -207,10 +217,10 @@ export interface ModelMetadata {
|
|
|
207
217
|
supports_quantization?: boolean | null;
|
|
208
218
|
/**
|
|
209
219
|
* Inference Fields
|
|
210
|
-
* @type {Array<
|
|
220
|
+
* @type {Array<Task>}
|
|
211
221
|
* @memberof ModelMetadata
|
|
212
222
|
*/
|
|
213
|
-
task_types?: Array<
|
|
223
|
+
task_types?: Array<Task> | null;
|
|
214
224
|
/**
|
|
215
225
|
*
|
|
216
226
|
* @type {boolean}
|
|
@@ -241,12 +251,6 @@ export interface ModelMetadata {
|
|
|
241
251
|
* @memberof ModelMetadata
|
|
242
252
|
*/
|
|
243
253
|
training_time?: number | null;
|
|
244
|
-
/**
|
|
245
|
-
*
|
|
246
|
-
* @type {string}
|
|
247
|
-
* @memberof ModelMetadata
|
|
248
|
-
*/
|
|
249
|
-
version?: string | null;
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
export function ModelMetadataFromJSON(json: any): ModelMetadata {
|
|
@@ -260,10 +264,10 @@ export function ModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
260
264
|
return {
|
|
261
265
|
|
|
262
266
|
'annotation': !exists(json, 'annotation') ? undefined : json['annotation'],
|
|
267
|
+
'author': !exists(json, 'author') ? undefined : json['author'],
|
|
263
268
|
'bias_evaluation_score': !exists(json, 'bias_evaluation_score') ? undefined : json['bias_evaluation_score'],
|
|
264
269
|
'edge_optimized': !exists(json, 'edge_optimized') ? undefined : json['edge_optimized'],
|
|
265
270
|
'finetuning_datasets': !exists(json, 'finetuning_datasets') ? undefined : json['finetuning_datasets'],
|
|
266
|
-
'framework': !exists(json, 'framework') ? undefined : json['framework'],
|
|
267
271
|
'image': !exists(json, 'image') ? undefined : json['image'],
|
|
268
272
|
'inference_distributed': !exists(json, 'inference_distributed') ? undefined : json['inference_distributed'],
|
|
269
273
|
'inference_hardware': !exists(json, 'inference_hardware') ? undefined : HardwareRequirementsFromJSON(json['inference_hardware']),
|
|
@@ -275,6 +279,7 @@ export function ModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
275
279
|
'inference_precision': !exists(json, 'inference_precision') ? undefined : json['inference_precision'],
|
|
276
280
|
'inference_software_dependencies': !exists(json, 'inference_software_dependencies') ? undefined : json['inference_software_dependencies'],
|
|
277
281
|
'keywords': !exists(json, 'keywords') ? undefined : json['keywords'],
|
|
282
|
+
'libraries': !exists(json, 'libraries') ? undefined : json['libraries'],
|
|
278
283
|
'license': !exists(json, 'license') ? undefined : json['license'],
|
|
279
284
|
'model_inputs': !exists(json, 'model_inputs') ? undefined : (json['model_inputs'] === null ? null : (json['model_inputs'] as Array<any>).map(ModelIOFromJSON)),
|
|
280
285
|
'model_outputs': !exists(json, 'model_outputs') ? undefined : (json['model_outputs'] === null ? null : (json['model_outputs'] as Array<any>).map(ModelIOFromJSON)),
|
|
@@ -288,13 +293,12 @@ export function ModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
288
293
|
'regulatory': !exists(json, 'regulatory') ? undefined : json['regulatory'],
|
|
289
294
|
'slimmed': !exists(json, 'slimmed') ? undefined : json['slimmed'],
|
|
290
295
|
'supports_quantization': !exists(json, 'supports_quantization') ? undefined : json['supports_quantization'],
|
|
291
|
-
'task_types': !exists(json, 'task_types') ? undefined : json['task_types'],
|
|
296
|
+
'task_types': !exists(json, 'task_types') ? undefined : (json['task_types'] === null ? null : (json['task_types'] as Array<any>).map(TaskFromJSON)),
|
|
292
297
|
'training_distributed': !exists(json, 'training_distributed') ? undefined : json['training_distributed'],
|
|
293
298
|
'training_hardware': !exists(json, 'training_hardware') ? undefined : HardwareRequirementsFromJSON(json['training_hardware']),
|
|
294
299
|
'training_max_energy_consumption_watts': !exists(json, 'training_max_energy_consumption_watts') ? undefined : json['training_max_energy_consumption_watts'],
|
|
295
300
|
'training_precision': !exists(json, 'training_precision') ? undefined : json['training_precision'],
|
|
296
301
|
'training_time': !exists(json, 'training_time') ? undefined : json['training_time'],
|
|
297
|
-
'version': !exists(json, 'version') ? undefined : json['version'],
|
|
298
302
|
};
|
|
299
303
|
}
|
|
300
304
|
|
|
@@ -308,10 +312,10 @@ export function ModelMetadataToJSON(value?: ModelMetadata | null): any {
|
|
|
308
312
|
return {
|
|
309
313
|
|
|
310
314
|
'annotation': value.annotation,
|
|
315
|
+
'author': value.author,
|
|
311
316
|
'bias_evaluation_score': value.bias_evaluation_score,
|
|
312
317
|
'edge_optimized': value.edge_optimized,
|
|
313
318
|
'finetuning_datasets': value.finetuning_datasets,
|
|
314
|
-
'framework': value.framework,
|
|
315
319
|
'image': value.image,
|
|
316
320
|
'inference_distributed': value.inference_distributed,
|
|
317
321
|
'inference_hardware': HardwareRequirementsToJSON(value.inference_hardware),
|
|
@@ -323,6 +327,7 @@ export function ModelMetadataToJSON(value?: ModelMetadata | null): any {
|
|
|
323
327
|
'inference_precision': value.inference_precision,
|
|
324
328
|
'inference_software_dependencies': value.inference_software_dependencies,
|
|
325
329
|
'keywords': value.keywords,
|
|
330
|
+
'libraries': value.libraries,
|
|
326
331
|
'license': value.license,
|
|
327
332
|
'model_inputs': value.model_inputs === undefined ? undefined : (value.model_inputs === null ? null : (value.model_inputs as Array<any>).map(ModelIOToJSON)),
|
|
328
333
|
'model_outputs': value.model_outputs === undefined ? undefined : (value.model_outputs === null ? null : (value.model_outputs as Array<any>).map(ModelIOToJSON)),
|
|
@@ -336,13 +341,12 @@ export function ModelMetadataToJSON(value?: ModelMetadata | null): any {
|
|
|
336
341
|
'regulatory': value.regulatory,
|
|
337
342
|
'slimmed': value.slimmed,
|
|
338
343
|
'supports_quantization': value.supports_quantization,
|
|
339
|
-
'task_types': value.task_types,
|
|
344
|
+
'task_types': value.task_types === undefined ? undefined : (value.task_types === null ? null : (value.task_types as Array<any>).map(TaskToJSON)),
|
|
340
345
|
'training_distributed': value.training_distributed,
|
|
341
346
|
'training_hardware': HardwareRequirementsToJSON(value.training_hardware),
|
|
342
347
|
'training_max_energy_consumption_watts': value.training_max_energy_consumption_watts,
|
|
343
348
|
'training_precision': value.training_precision,
|
|
344
349
|
'training_time': value.training_time,
|
|
345
|
-
'version': value.version,
|
|
346
350
|
};
|
|
347
351
|
}
|
|
348
352
|
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
/**
|
|
16
|
+
* An enum of all task types available on Huggingface
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum Task {
|
|
21
|
+
AnyToAny = 'AnyToAny',
|
|
22
|
+
AudioClassification = 'AudioClassification',
|
|
23
|
+
AudioToAudio = 'AudioToAudio',
|
|
24
|
+
AudioTextToText = 'AudioTextToText',
|
|
25
|
+
AutomaticSpeechRecognition = 'AutomaticSpeechRecognition',
|
|
26
|
+
DepthEstimation = 'DepthEstimation',
|
|
27
|
+
DocumentQuestionAnswering = 'DocumentQuestionAnswering',
|
|
28
|
+
VisualDocumentRetrieval = 'VisualDocumentRetrieval',
|
|
29
|
+
FeatureExtraction = 'FeatureExtraction',
|
|
30
|
+
FillMask = 'FillMask',
|
|
31
|
+
ImageClassification = 'ImageClassification',
|
|
32
|
+
ImageFeatureExtraction = 'ImageFeatureExtraction',
|
|
33
|
+
ImageSegmentation = 'ImageSegmentation',
|
|
34
|
+
ImageToImage = 'ImageToImage',
|
|
35
|
+
ImageTextToText = 'ImageTextToText',
|
|
36
|
+
ImageToText = 'ImageToText',
|
|
37
|
+
ImageToVideo = 'ImageToVideo',
|
|
38
|
+
KeypointDetection = 'KeypointDetection',
|
|
39
|
+
MaskGeneration = 'MaskGeneration',
|
|
40
|
+
ObjectDetection = 'ObjectDetection',
|
|
41
|
+
VideoClassification = 'VideoClassification',
|
|
42
|
+
QuestionAnswering = 'QuestionAnswering',
|
|
43
|
+
ReinforcementLearning = 'ReinforcementLearning',
|
|
44
|
+
SentenceSimilarity = 'SentenceSimilarity',
|
|
45
|
+
Summarization = 'Summarization',
|
|
46
|
+
TableQuestionAnswering = 'TableQuestionAnswering',
|
|
47
|
+
TabularClassification = 'TabularClassification',
|
|
48
|
+
TabularRegression = 'TabularRegression',
|
|
49
|
+
TextClassification = 'TextClassification',
|
|
50
|
+
TextGeneration = 'TextGeneration',
|
|
51
|
+
TextRanking = 'TextRanking',
|
|
52
|
+
TextToImage = 'TextToImage',
|
|
53
|
+
TextToSpeech = 'TextToSpeech',
|
|
54
|
+
TextToVideo = 'TextToVideo',
|
|
55
|
+
TokenClassification = 'TokenClassification',
|
|
56
|
+
Translation = 'Translation',
|
|
57
|
+
UnconditionalImageGeneration = 'UnconditionalImageGeneration',
|
|
58
|
+
VideoTextToText = 'VideoTextToText',
|
|
59
|
+
VideoToVideo = 'VideoToVideo',
|
|
60
|
+
VisualQuestionAnswering = 'VisualQuestionAnswering',
|
|
61
|
+
ZeroShotClassification = 'ZeroShotClassification',
|
|
62
|
+
ZeroShotImageClassification = 'ZeroShotImageClassification',
|
|
63
|
+
ZeroShotObjectDetection = 'ZeroShotObjectDetection',
|
|
64
|
+
TextTo3d = 'TextTo3d',
|
|
65
|
+
ImageTo3d = 'ImageTo3d'
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function TaskFromJSON(json: any): Task {
|
|
69
|
+
return TaskFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function TaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Task {
|
|
73
|
+
return json as Task;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function TaskToJSON(value?: Task | null): any {
|
|
77
|
+
return value as any;
|
|
78
|
+
}
|
|
79
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -7,14 +7,19 @@ export * from './ArtifactIngestionStatus';
|
|
|
7
7
|
export * from './ArtifactPublication';
|
|
8
8
|
export * from './ArtifactPublicationStatus';
|
|
9
9
|
export * from './ArtifactType';
|
|
10
|
+
export * from './AssociateModelMetadata';
|
|
11
|
+
export * from './AssociateModelMetadataResponse';
|
|
10
12
|
export * from './BadRequestResponse';
|
|
11
13
|
export * from './CreateModelMetadataResponse';
|
|
12
14
|
export * from './DiscoverModelsByPlatformResponse';
|
|
15
|
+
export * from './DiscoverModelsResponse';
|
|
13
16
|
export * from './DiscoveryCriteria';
|
|
17
|
+
export * from './DiscoveryCriterion';
|
|
14
18
|
export * from './GetModelArtifactResponse';
|
|
15
19
|
export * from './GetModelByPlatformResponse';
|
|
16
20
|
export * from './GetModelIngestionResponse';
|
|
17
21
|
export * from './GetModelPublicationResponse';
|
|
22
|
+
export * from './GetModelResponse';
|
|
18
23
|
export * from './HardwareRequirements';
|
|
19
24
|
export * from './IngestArtifactRequest';
|
|
20
25
|
export * from './IngestModelArtifactResponse';
|
|
@@ -23,7 +28,10 @@ export * from './ListModelIngestionsResponse';
|
|
|
23
28
|
export * from './ListModelPublicationsForArtifactResponse';
|
|
24
29
|
export * from './ListModelPublicationsResponse';
|
|
25
30
|
export * from './ListModelsByPlatformResponse';
|
|
31
|
+
export * from './ListModelsResponse';
|
|
26
32
|
export * from './ListPlatformsResponse';
|
|
33
|
+
export * from './ListTasksResponse';
|
|
34
|
+
export * from './ModelArtifact';
|
|
27
35
|
export * from './ModelIO';
|
|
28
36
|
export * from './ModelMetadata';
|
|
29
37
|
export * from './NotFoundResponse';
|
|
@@ -33,3 +41,4 @@ export * from './PublishArtifactRequest';
|
|
|
33
41
|
export * from './PublishModelArtifactResponse';
|
|
34
42
|
export * from './ServerErrorResponse';
|
|
35
43
|
export * from './SystemRequirement';
|
|
44
|
+
export * from './Task';
|