@mlhub/deployments-ts-sdk 0.13.0 → 0.15.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 +1 -2
- package/README.md +2 -2
- package/dist/models/Argument.d.ts +33 -0
- package/dist/models/Argument.js +42 -0
- package/dist/models/DeployModelWithStrategyBody.d.ts +15 -3
- package/dist/models/DeployModelWithStrategyBody.js +6 -2
- package/dist/models/ModelDeployment.d.ts +1 -1
- package/dist/models/ModelDeployment.js +1 -1
- package/dist/models/ReplicaGroup.d.ts +1 -7
- package/dist/models/ReplicaGroup.js +0 -2
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.js +1 -2
- package/package.json +1 -1
- package/src/models/Argument.ts +64 -0
- package/src/models/DeployModelWithStrategyBody.ts +28 -4
- package/src/models/ModelDeployment.ts +2 -2
- package/src/models/ReplicaGroup.ts +0 -12
- package/src/models/index.ts +1 -2
- package/dist/models/GpuResource.d.ts +0 -39
- package/dist/models/GpuResource.js +0 -45
- package/dist/models/ResourceRequirements.d.ts +0 -46
- package/dist/models/ResourceRequirements.js +0 -48
- package/src/models/GpuResource.ts +0 -72
- package/src/models/ResourceRequirements.ts +0 -87
package/.openapi-generator/FILES
CHANGED
|
@@ -7,12 +7,12 @@ src/apis/DeploymentsApi.ts
|
|
|
7
7
|
src/apis/StrategiesApi.ts
|
|
8
8
|
src/apis/index.ts
|
|
9
9
|
src/index.ts
|
|
10
|
+
src/models/Argument.ts
|
|
10
11
|
src/models/BadRequestResponse.ts
|
|
11
12
|
src/models/Choice.ts
|
|
12
13
|
src/models/DeployModelWithStrategyBody.ts
|
|
13
14
|
src/models/DeploymentModality.ts
|
|
14
15
|
src/models/DesiredState.ts
|
|
15
|
-
src/models/GpuResource.ts
|
|
16
16
|
src/models/ListDeploymentStrategiesResponse.ts
|
|
17
17
|
src/models/ListModelDeploymentsResponse.ts
|
|
18
18
|
src/models/ModelDeployment.ts
|
|
@@ -26,7 +26,6 @@ src/models/Parameter.ts
|
|
|
26
26
|
src/models/ParameterType.ts
|
|
27
27
|
src/models/Platform.ts
|
|
28
28
|
src/models/ReplicaGroup.ts
|
|
29
|
-
src/models/ResourceRequirements.ts
|
|
30
29
|
src/models/RestApi.ts
|
|
31
30
|
src/models/Scope.ts
|
|
32
31
|
src/models/ServerErrorResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-ts-sdk@0.15.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @mlhub/deployments-ts-sdk@0.
|
|
39
|
+
npm install @mlhub/deployments-ts-sdk@0.15.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MLHub Deployments 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 Argument
|
|
16
|
+
*/
|
|
17
|
+
export interface Argument {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Argument
|
|
22
|
+
*/
|
|
23
|
+
parameter_name: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Argument
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function ArgumentFromJSON(json: any): Argument;
|
|
32
|
+
export declare function ArgumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Argument;
|
|
33
|
+
export declare function ArgumentToJSON(value?: Argument | null): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MLHub Deployments 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.ArgumentFromJSON = ArgumentFromJSON;
|
|
17
|
+
exports.ArgumentFromJSONTyped = ArgumentFromJSONTyped;
|
|
18
|
+
exports.ArgumentToJSON = ArgumentToJSON;
|
|
19
|
+
function ArgumentFromJSON(json) {
|
|
20
|
+
return ArgumentFromJSONTyped(json, false);
|
|
21
|
+
}
|
|
22
|
+
function ArgumentFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'parameter_name': json['parameter_name'],
|
|
28
|
+
'value': json['value'],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function ArgumentToJSON(value) {
|
|
32
|
+
if (value === undefined) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'parameter_name': value.parameter_name,
|
|
40
|
+
'value': value.value,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { DeploymentModality, Scope } from './';
|
|
12
|
+
import { Argument, DeploymentModality, ParallelismStrategy, Scope } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
16
16
|
* @interface DeployModelWithStrategyBody
|
|
17
17
|
*/
|
|
18
18
|
export interface DeployModelWithStrategyBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Argument>}
|
|
22
|
+
* @memberof DeployModelWithStrategyBody
|
|
23
|
+
*/
|
|
24
|
+
arguments?: Array<Argument> | null;
|
|
19
25
|
/**
|
|
20
26
|
*
|
|
21
27
|
* @type {DeploymentModality}
|
|
@@ -48,10 +54,16 @@ export interface DeployModelWithStrategyBody {
|
|
|
48
54
|
name: string;
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
51
|
-
* @type {
|
|
57
|
+
* @type {Array<ParallelismStrategy>}
|
|
58
|
+
* @memberof DeployModelWithStrategyBody
|
|
59
|
+
*/
|
|
60
|
+
parallelism_strategies?: Array<ParallelismStrategy> | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
52
64
|
* @memberof DeployModelWithStrategyBody
|
|
53
65
|
*/
|
|
54
|
-
|
|
66
|
+
replicas?: number | null;
|
|
55
67
|
/**
|
|
56
68
|
* Selector for global vs tenant-scoped models
|
|
57
69
|
* @type {Scope}
|
|
@@ -26,12 +26,14 @@ function DeployModelWithStrategyBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
+
'arguments': !(0, runtime_1.exists)(json, 'arguments') ? undefined : (json['arguments'] === null ? null : json['arguments'].map(_1.ArgumentFromJSON)),
|
|
29
30
|
'deployment_modality': (0, _1.DeploymentModalityFromJSON)(json['deployment_modality']),
|
|
30
31
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
31
32
|
'model_author': json['model_author'],
|
|
32
33
|
'model_name': json['model_name'],
|
|
33
34
|
'name': json['name'],
|
|
34
|
-
'
|
|
35
|
+
'parallelism_strategies': !(0, runtime_1.exists)(json, 'parallelism_strategies') ? undefined : (json['parallelism_strategies'] === null ? null : json['parallelism_strategies'].map(_1.ParallelismStrategyFromJSON)),
|
|
36
|
+
'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : json['replicas'],
|
|
35
37
|
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : (0, _1.ScopeFromJSON)(json['scope']),
|
|
36
38
|
};
|
|
37
39
|
}
|
|
@@ -43,12 +45,14 @@ function DeployModelWithStrategyBodyToJSON(value) {
|
|
|
43
45
|
return null;
|
|
44
46
|
}
|
|
45
47
|
return {
|
|
48
|
+
'arguments': value.arguments === undefined ? undefined : (value.arguments === null ? null : value.arguments.map(_1.ArgumentToJSON)),
|
|
46
49
|
'deployment_modality': (0, _1.DeploymentModalityToJSON)(value.deployment_modality),
|
|
47
50
|
'description': value.description,
|
|
48
51
|
'model_author': value.model_author,
|
|
49
52
|
'model_name': value.model_name,
|
|
50
53
|
'name': value.name,
|
|
51
|
-
'
|
|
54
|
+
'parallelism_strategies': value.parallelism_strategies === undefined ? undefined : (value.parallelism_strategies === null ? null : value.parallelism_strategies.map(_1.ParallelismStrategyToJSON)),
|
|
55
|
+
'replicas': value.replicas,
|
|
52
56
|
'scope': (0, _1.ScopeToJSON)(value.scope),
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -41,7 +41,7 @@ function ModelDeploymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
'name': json['name'],
|
|
42
42
|
'owner': json['owner'],
|
|
43
43
|
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
44
|
-
'replicas':
|
|
44
|
+
'replicas': (0, _1.ReplicaGroupFromJSON)(json['replicas']),
|
|
45
45
|
'revision': json['revision'],
|
|
46
46
|
'state': (0, _1.StateFromJSON)(json['state']),
|
|
47
47
|
'visibility': (0, _1.VisibilityFromJSON)(json['visibility']),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ParallelismStrategy
|
|
12
|
+
import { ParallelismStrategy } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -28,12 +28,6 @@ export interface ReplicaGroup {
|
|
|
28
28
|
* @memberof ReplicaGroup
|
|
29
29
|
*/
|
|
30
30
|
parallelism_strategies: Array<ParallelismStrategy>;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {ResourceRequirements}
|
|
34
|
-
* @memberof ReplicaGroup
|
|
35
|
-
*/
|
|
36
|
-
resources: ResourceRequirements;
|
|
37
31
|
}
|
|
38
32
|
export declare function ReplicaGroupFromJSON(json: any): ReplicaGroup;
|
|
39
33
|
export declare function ReplicaGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaGroup;
|
|
@@ -27,7 +27,6 @@ function ReplicaGroupFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
27
27
|
return {
|
|
28
28
|
'count': json['count'],
|
|
29
29
|
'parallelism_strategies': (json['parallelism_strategies'].map(_1.ParallelismStrategyFromJSON)),
|
|
30
|
-
'resources': (0, _1.ResourceRequirementsFromJSON)(json['resources']),
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
32
|
function ReplicaGroupToJSON(value) {
|
|
@@ -40,6 +39,5 @@ function ReplicaGroupToJSON(value) {
|
|
|
40
39
|
return {
|
|
41
40
|
'count': value.count,
|
|
42
41
|
'parallelism_strategies': (value.parallelism_strategies.map(_1.ParallelismStrategyToJSON)),
|
|
43
|
-
'resources': (0, _1.ResourceRequirementsToJSON)(value.resources),
|
|
44
42
|
};
|
|
45
43
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export * from './Argument';
|
|
1
2
|
export * from './BadRequestResponse';
|
|
2
3
|
export * from './Choice';
|
|
3
4
|
export * from './DeployModelWithStrategyBody';
|
|
4
5
|
export * from './DeploymentModality';
|
|
5
6
|
export * from './DesiredState';
|
|
6
|
-
export * from './GpuResource';
|
|
7
7
|
export * from './ListDeploymentStrategiesResponse';
|
|
8
8
|
export * from './ListModelDeploymentsResponse';
|
|
9
9
|
export * from './ModelDeployment';
|
|
@@ -17,7 +17,6 @@ export * from './Parameter';
|
|
|
17
17
|
export * from './ParameterType';
|
|
18
18
|
export * from './Platform';
|
|
19
19
|
export * from './ReplicaGroup';
|
|
20
|
-
export * from './ResourceRequirements';
|
|
21
20
|
export * from './RestApi';
|
|
22
21
|
export * from './Scope';
|
|
23
22
|
export * from './ServerErrorResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -16,12 +16,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./Argument"), exports);
|
|
19
20
|
__exportStar(require("./BadRequestResponse"), exports);
|
|
20
21
|
__exportStar(require("./Choice"), exports);
|
|
21
22
|
__exportStar(require("./DeployModelWithStrategyBody"), exports);
|
|
22
23
|
__exportStar(require("./DeploymentModality"), exports);
|
|
23
24
|
__exportStar(require("./DesiredState"), exports);
|
|
24
|
-
__exportStar(require("./GpuResource"), exports);
|
|
25
25
|
__exportStar(require("./ListDeploymentStrategiesResponse"), exports);
|
|
26
26
|
__exportStar(require("./ListModelDeploymentsResponse"), exports);
|
|
27
27
|
__exportStar(require("./ModelDeployment"), exports);
|
|
@@ -35,7 +35,6 @@ __exportStar(require("./Parameter"), exports);
|
|
|
35
35
|
__exportStar(require("./ParameterType"), exports);
|
|
36
36
|
__exportStar(require("./Platform"), exports);
|
|
37
37
|
__exportStar(require("./ReplicaGroup"), exports);
|
|
38
|
-
__exportStar(require("./ResourceRequirements"), exports);
|
|
39
38
|
__exportStar(require("./RestApi"), exports);
|
|
40
39
|
__exportStar(require("./Scope"), exports);
|
|
41
40
|
__exportStar(require("./ServerErrorResponse"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments 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 Argument
|
|
20
|
+
*/
|
|
21
|
+
export interface Argument {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Argument
|
|
26
|
+
*/
|
|
27
|
+
parameter_name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Argument
|
|
32
|
+
*/
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function ArgumentFromJSON(json: any): Argument {
|
|
37
|
+
return ArgumentFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ArgumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Argument {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'parameter_name': json['parameter_name'],
|
|
47
|
+
'value': json['value'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ArgumentToJSON(value?: Argument | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'parameter_name': value.parameter_name,
|
|
61
|
+
'value': value.value,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -14,10 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
+
Argument,
|
|
18
|
+
ArgumentFromJSON,
|
|
19
|
+
ArgumentFromJSONTyped,
|
|
20
|
+
ArgumentToJSON,
|
|
17
21
|
DeploymentModality,
|
|
18
22
|
DeploymentModalityFromJSON,
|
|
19
23
|
DeploymentModalityFromJSONTyped,
|
|
20
24
|
DeploymentModalityToJSON,
|
|
25
|
+
ParallelismStrategy,
|
|
26
|
+
ParallelismStrategyFromJSON,
|
|
27
|
+
ParallelismStrategyFromJSONTyped,
|
|
28
|
+
ParallelismStrategyToJSON,
|
|
21
29
|
Scope,
|
|
22
30
|
ScopeFromJSON,
|
|
23
31
|
ScopeFromJSONTyped,
|
|
@@ -30,6 +38,12 @@ import {
|
|
|
30
38
|
* @interface DeployModelWithStrategyBody
|
|
31
39
|
*/
|
|
32
40
|
export interface DeployModelWithStrategyBody {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<Argument>}
|
|
44
|
+
* @memberof DeployModelWithStrategyBody
|
|
45
|
+
*/
|
|
46
|
+
arguments?: Array<Argument> | null;
|
|
33
47
|
/**
|
|
34
48
|
*
|
|
35
49
|
* @type {DeploymentModality}
|
|
@@ -62,10 +76,16 @@ export interface DeployModelWithStrategyBody {
|
|
|
62
76
|
name: string;
|
|
63
77
|
/**
|
|
64
78
|
*
|
|
65
|
-
* @type {
|
|
79
|
+
* @type {Array<ParallelismStrategy>}
|
|
80
|
+
* @memberof DeployModelWithStrategyBody
|
|
81
|
+
*/
|
|
82
|
+
parallelism_strategies?: Array<ParallelismStrategy> | null;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
66
86
|
* @memberof DeployModelWithStrategyBody
|
|
67
87
|
*/
|
|
68
|
-
|
|
88
|
+
replicas?: number | null;
|
|
69
89
|
/**
|
|
70
90
|
* Selector for global vs tenant-scoped models
|
|
71
91
|
* @type {Scope}
|
|
@@ -84,12 +104,14 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
|
|
|
84
104
|
}
|
|
85
105
|
return {
|
|
86
106
|
|
|
107
|
+
'arguments': !exists(json, 'arguments') ? undefined : (json['arguments'] === null ? null : (json['arguments'] as Array<any>).map(ArgumentFromJSON)),
|
|
87
108
|
'deployment_modality': DeploymentModalityFromJSON(json['deployment_modality']),
|
|
88
109
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
89
110
|
'model_author': json['model_author'],
|
|
90
111
|
'model_name': json['model_name'],
|
|
91
112
|
'name': json['name'],
|
|
92
|
-
'
|
|
113
|
+
'parallelism_strategies': !exists(json, 'parallelism_strategies') ? undefined : (json['parallelism_strategies'] === null ? null : (json['parallelism_strategies'] as Array<any>).map(ParallelismStrategyFromJSON)),
|
|
114
|
+
'replicas': !exists(json, 'replicas') ? undefined : json['replicas'],
|
|
93
115
|
'scope': !exists(json, 'scope') ? undefined : ScopeFromJSON(json['scope']),
|
|
94
116
|
};
|
|
95
117
|
}
|
|
@@ -103,12 +125,14 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
|
|
|
103
125
|
}
|
|
104
126
|
return {
|
|
105
127
|
|
|
128
|
+
'arguments': value.arguments === undefined ? undefined : (value.arguments === null ? null : (value.arguments as Array<any>).map(ArgumentToJSON)),
|
|
106
129
|
'deployment_modality': DeploymentModalityToJSON(value.deployment_modality),
|
|
107
130
|
'description': value.description,
|
|
108
131
|
'model_author': value.model_author,
|
|
109
132
|
'model_name': value.model_name,
|
|
110
133
|
'name': value.name,
|
|
111
|
-
'
|
|
134
|
+
'parallelism_strategies': value.parallelism_strategies === undefined ? undefined : (value.parallelism_strategies === null ? null : (value.parallelism_strategies as Array<any>).map(ParallelismStrategyToJSON)),
|
|
135
|
+
'replicas': value.replicas,
|
|
112
136
|
'scope': ScopeToJSON(value.scope),
|
|
113
137
|
};
|
|
114
138
|
}
|
|
@@ -145,7 +145,7 @@ export interface ModelDeployment {
|
|
|
145
145
|
* @type {ReplicaGroup}
|
|
146
146
|
* @memberof ModelDeployment
|
|
147
147
|
*/
|
|
148
|
-
replicas
|
|
148
|
+
replicas: ReplicaGroup;
|
|
149
149
|
/**
|
|
150
150
|
*
|
|
151
151
|
* @type {number}
|
|
@@ -191,7 +191,7 @@ export function ModelDeploymentFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
191
191
|
'name': json['name'],
|
|
192
192
|
'owner': json['owner'],
|
|
193
193
|
'platform': PlatformFromJSON(json['platform']),
|
|
194
|
-
'replicas':
|
|
194
|
+
'replicas': ReplicaGroupFromJSON(json['replicas']),
|
|
195
195
|
'revision': json['revision'],
|
|
196
196
|
'state': StateFromJSON(json['state']),
|
|
197
197
|
'visibility': VisibilityFromJSON(json['visibility']),
|
|
@@ -18,10 +18,6 @@ import {
|
|
|
18
18
|
ParallelismStrategyFromJSON,
|
|
19
19
|
ParallelismStrategyFromJSONTyped,
|
|
20
20
|
ParallelismStrategyToJSON,
|
|
21
|
-
ResourceRequirements,
|
|
22
|
-
ResourceRequirementsFromJSON,
|
|
23
|
-
ResourceRequirementsFromJSONTyped,
|
|
24
|
-
ResourceRequirementsToJSON,
|
|
25
21
|
} from './';
|
|
26
22
|
|
|
27
23
|
/**
|
|
@@ -42,12 +38,6 @@ export interface ReplicaGroup {
|
|
|
42
38
|
* @memberof ReplicaGroup
|
|
43
39
|
*/
|
|
44
40
|
parallelism_strategies: Array<ParallelismStrategy>;
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @type {ResourceRequirements}
|
|
48
|
-
* @memberof ReplicaGroup
|
|
49
|
-
*/
|
|
50
|
-
resources: ResourceRequirements;
|
|
51
41
|
}
|
|
52
42
|
|
|
53
43
|
export function ReplicaGroupFromJSON(json: any): ReplicaGroup {
|
|
@@ -62,7 +52,6 @@ export function ReplicaGroupFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
62
52
|
|
|
63
53
|
'count': json['count'],
|
|
64
54
|
'parallelism_strategies': ((json['parallelism_strategies'] as Array<any>).map(ParallelismStrategyFromJSON)),
|
|
65
|
-
'resources': ResourceRequirementsFromJSON(json['resources']),
|
|
66
55
|
};
|
|
67
56
|
}
|
|
68
57
|
|
|
@@ -77,7 +66,6 @@ export function ReplicaGroupToJSON(value?: ReplicaGroup | null): any {
|
|
|
77
66
|
|
|
78
67
|
'count': value.count,
|
|
79
68
|
'parallelism_strategies': ((value.parallelism_strategies as Array<any>).map(ParallelismStrategyToJSON)),
|
|
80
|
-
'resources': ResourceRequirementsToJSON(value.resources),
|
|
81
69
|
};
|
|
82
70
|
}
|
|
83
71
|
|
package/src/models/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './Argument';
|
|
3
4
|
export * from './BadRequestResponse';
|
|
4
5
|
export * from './Choice';
|
|
5
6
|
export * from './DeployModelWithStrategyBody';
|
|
6
7
|
export * from './DeploymentModality';
|
|
7
8
|
export * from './DesiredState';
|
|
8
|
-
export * from './GpuResource';
|
|
9
9
|
export * from './ListDeploymentStrategiesResponse';
|
|
10
10
|
export * from './ListModelDeploymentsResponse';
|
|
11
11
|
export * from './ModelDeployment';
|
|
@@ -19,7 +19,6 @@ export * from './Parameter';
|
|
|
19
19
|
export * from './ParameterType';
|
|
20
20
|
export * from './Platform';
|
|
21
21
|
export * from './ReplicaGroup';
|
|
22
|
-
export * from './ResourceRequirements';
|
|
23
22
|
export * from './RestApi';
|
|
24
23
|
export * from './Scope';
|
|
25
24
|
export * from './ServerErrorResponse';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MLHub Deployments 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 GpuResource
|
|
16
|
-
*/
|
|
17
|
-
export interface GpuResource {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof GpuResource
|
|
22
|
-
*/
|
|
23
|
-
gpu_type?: string | null;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {number}
|
|
27
|
-
* @memberof GpuResource
|
|
28
|
-
*/
|
|
29
|
-
memory?: number | null;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {string}
|
|
33
|
-
* @memberof GpuResource
|
|
34
|
-
*/
|
|
35
|
-
vendor?: string | null;
|
|
36
|
-
}
|
|
37
|
-
export declare function GpuResourceFromJSON(json: any): GpuResource;
|
|
38
|
-
export declare function GpuResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuResource;
|
|
39
|
-
export declare function GpuResourceToJSON(value?: GpuResource | null): any;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* MLHub Deployments 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.GpuResourceFromJSON = GpuResourceFromJSON;
|
|
17
|
-
exports.GpuResourceFromJSONTyped = GpuResourceFromJSONTyped;
|
|
18
|
-
exports.GpuResourceToJSON = GpuResourceToJSON;
|
|
19
|
-
var runtime_1 = require("../runtime");
|
|
20
|
-
function GpuResourceFromJSON(json) {
|
|
21
|
-
return GpuResourceFromJSONTyped(json, false);
|
|
22
|
-
}
|
|
23
|
-
function GpuResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
-
if ((json === undefined) || (json === null)) {
|
|
25
|
-
return json;
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
'gpu_type': !(0, runtime_1.exists)(json, 'gpu_type') ? undefined : json['gpu_type'],
|
|
29
|
-
'memory': !(0, runtime_1.exists)(json, 'memory') ? undefined : json['memory'],
|
|
30
|
-
'vendor': !(0, runtime_1.exists)(json, 'vendor') ? undefined : json['vendor'],
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function GpuResourceToJSON(value) {
|
|
34
|
-
if (value === undefined) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
if (value === null) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
'gpu_type': value.gpu_type,
|
|
42
|
-
'memory': value.memory,
|
|
43
|
-
'vendor': value.vendor,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MLHub Deployments API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { GpuResource } from './';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface ResourceRequirements
|
|
17
|
-
*/
|
|
18
|
-
export interface ResourceRequirements {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof ResourceRequirements
|
|
23
|
-
*/
|
|
24
|
-
cores?: number | null;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {number}
|
|
28
|
-
* @memberof ResourceRequirements
|
|
29
|
-
*/
|
|
30
|
-
disk?: number | null;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {GpuResource}
|
|
34
|
-
* @memberof ResourceRequirements
|
|
35
|
-
*/
|
|
36
|
-
gpu?: GpuResource;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof ResourceRequirements
|
|
41
|
-
*/
|
|
42
|
-
memory?: number | null;
|
|
43
|
-
}
|
|
44
|
-
export declare function ResourceRequirementsFromJSON(json: any): ResourceRequirements;
|
|
45
|
-
export declare function ResourceRequirementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceRequirements;
|
|
46
|
-
export declare function ResourceRequirementsToJSON(value?: ResourceRequirements | null): any;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* MLHub Deployments 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.ResourceRequirementsFromJSON = ResourceRequirementsFromJSON;
|
|
17
|
-
exports.ResourceRequirementsFromJSONTyped = ResourceRequirementsFromJSONTyped;
|
|
18
|
-
exports.ResourceRequirementsToJSON = ResourceRequirementsToJSON;
|
|
19
|
-
var runtime_1 = require("../runtime");
|
|
20
|
-
var _1 = require("./");
|
|
21
|
-
function ResourceRequirementsFromJSON(json) {
|
|
22
|
-
return ResourceRequirementsFromJSONTyped(json, false);
|
|
23
|
-
}
|
|
24
|
-
function ResourceRequirementsFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
-
if ((json === undefined) || (json === null)) {
|
|
26
|
-
return json;
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
'cores': !(0, runtime_1.exists)(json, 'cores') ? undefined : json['cores'],
|
|
30
|
-
'disk': !(0, runtime_1.exists)(json, 'disk') ? undefined : json['disk'],
|
|
31
|
-
'gpu': !(0, runtime_1.exists)(json, 'gpu') ? undefined : (0, _1.GpuResourceFromJSON)(json['gpu']),
|
|
32
|
-
'memory': !(0, runtime_1.exists)(json, 'memory') ? undefined : json['memory'],
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function ResourceRequirementsToJSON(value) {
|
|
36
|
-
if (value === undefined) {
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
if (value === null) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'cores': value.cores,
|
|
44
|
-
'disk': value.disk,
|
|
45
|
-
'gpu': (0, _1.GpuResourceToJSON)(value.gpu),
|
|
46
|
-
'memory': value.memory,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLHub Deployments 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 GpuResource
|
|
20
|
-
*/
|
|
21
|
-
export interface GpuResource {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof GpuResource
|
|
26
|
-
*/
|
|
27
|
-
gpu_type?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof GpuResource
|
|
32
|
-
*/
|
|
33
|
-
memory?: number | null;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof GpuResource
|
|
38
|
-
*/
|
|
39
|
-
vendor?: string | null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function GpuResourceFromJSON(json: any): GpuResource {
|
|
43
|
-
return GpuResourceFromJSONTyped(json, false);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function GpuResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuResource {
|
|
47
|
-
if ((json === undefined) || (json === null)) {
|
|
48
|
-
return json;
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
|
|
52
|
-
'gpu_type': !exists(json, 'gpu_type') ? undefined : json['gpu_type'],
|
|
53
|
-
'memory': !exists(json, 'memory') ? undefined : json['memory'],
|
|
54
|
-
'vendor': !exists(json, 'vendor') ? undefined : json['vendor'],
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function GpuResourceToJSON(value?: GpuResource | null): any {
|
|
59
|
-
if (value === undefined) {
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
if (value === null) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
|
|
67
|
-
'gpu_type': value.gpu_type,
|
|
68
|
-
'memory': value.memory,
|
|
69
|
-
'vendor': value.vendor,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* MLHub Deployments 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
|
-
GpuResource,
|
|
18
|
-
GpuResourceFromJSON,
|
|
19
|
-
GpuResourceFromJSONTyped,
|
|
20
|
-
GpuResourceToJSON,
|
|
21
|
-
} from './';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface ResourceRequirements
|
|
27
|
-
*/
|
|
28
|
-
export interface ResourceRequirements {
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {number}
|
|
32
|
-
* @memberof ResourceRequirements
|
|
33
|
-
*/
|
|
34
|
-
cores?: number | null;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @memberof ResourceRequirements
|
|
39
|
-
*/
|
|
40
|
-
disk?: number | null;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {GpuResource}
|
|
44
|
-
* @memberof ResourceRequirements
|
|
45
|
-
*/
|
|
46
|
-
gpu?: GpuResource;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {number}
|
|
50
|
-
* @memberof ResourceRequirements
|
|
51
|
-
*/
|
|
52
|
-
memory?: number | null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function ResourceRequirementsFromJSON(json: any): ResourceRequirements {
|
|
56
|
-
return ResourceRequirementsFromJSONTyped(json, false);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function ResourceRequirementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceRequirements {
|
|
60
|
-
if ((json === undefined) || (json === null)) {
|
|
61
|
-
return json;
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
|
|
65
|
-
'cores': !exists(json, 'cores') ? undefined : json['cores'],
|
|
66
|
-
'disk': !exists(json, 'disk') ? undefined : json['disk'],
|
|
67
|
-
'gpu': !exists(json, 'gpu') ? undefined : GpuResourceFromJSON(json['gpu']),
|
|
68
|
-
'memory': !exists(json, 'memory') ? undefined : json['memory'],
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function ResourceRequirementsToJSON(value?: ResourceRequirements | null): any {
|
|
73
|
-
if (value === undefined) {
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
if (value === null) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
|
|
81
|
-
'cores': value.cores,
|
|
82
|
-
'disk': value.disk,
|
|
83
|
-
'gpu': GpuResourceToJSON(value.gpu),
|
|
84
|
-
'memory': value.memory,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|