@mlhub/deployments-ts-sdk 0.12.0 → 0.14.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/DeployModelWithStrategyBody.d.ts +19 -1
- package/dist/models/DeployModelWithStrategyBody.js +6 -0
- 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/Strategy.d.ts +9 -3
- package/dist/models/Strategy.js +4 -2
- package/dist/models/StrategyConfig.d.ts +52 -0
- package/dist/models/StrategyConfig.js +50 -0
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.js +1 -2
- package/package.json +1 -1
- package/src/models/DeployModelWithStrategyBody.ts +32 -0
- package/src/models/ModelDeployment.ts +2 -2
- package/src/models/ReplicaGroup.ts +0 -12
- package/src/models/Strategy.ts +16 -8
- package/src/models/StrategyConfig.ts +99 -0
- 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
|
@@ -12,7 +12,6 @@ src/models/Choice.ts
|
|
|
12
12
|
src/models/DeployModelWithStrategyBody.ts
|
|
13
13
|
src/models/DeploymentModality.ts
|
|
14
14
|
src/models/DesiredState.ts
|
|
15
|
-
src/models/GpuResource.ts
|
|
16
15
|
src/models/ListDeploymentStrategiesResponse.ts
|
|
17
16
|
src/models/ListModelDeploymentsResponse.ts
|
|
18
17
|
src/models/ModelDeployment.ts
|
|
@@ -26,12 +25,12 @@ src/models/Parameter.ts
|
|
|
26
25
|
src/models/ParameterType.ts
|
|
27
26
|
src/models/Platform.ts
|
|
28
27
|
src/models/ReplicaGroup.ts
|
|
29
|
-
src/models/ResourceRequirements.ts
|
|
30
28
|
src/models/RestApi.ts
|
|
31
29
|
src/models/Scope.ts
|
|
32
30
|
src/models/ServerErrorResponse.ts
|
|
33
31
|
src/models/State.ts
|
|
34
32
|
src/models/Strategy.ts
|
|
33
|
+
src/models/StrategyConfig.ts
|
|
35
34
|
src/models/Visibility.ts
|
|
36
35
|
src/models/index.ts
|
|
37
36
|
src/runtime.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-ts-sdk@0.14.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.14.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Scope } from './';
|
|
12
|
+
import { 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 {DeploymentModality}
|
|
22
|
+
* @memberof DeployModelWithStrategyBody
|
|
23
|
+
*/
|
|
24
|
+
deployment_modality: DeploymentModality;
|
|
19
25
|
/**
|
|
20
26
|
*
|
|
21
27
|
* @type {string}
|
|
@@ -40,12 +46,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
40
46
|
* @memberof DeployModelWithStrategyBody
|
|
41
47
|
*/
|
|
42
48
|
name: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Array<ParallelismStrategy>}
|
|
52
|
+
* @memberof DeployModelWithStrategyBody
|
|
53
|
+
*/
|
|
54
|
+
parallelism_strategies?: Array<ParallelismStrategy> | null;
|
|
43
55
|
/**
|
|
44
56
|
*
|
|
45
57
|
* @type {any}
|
|
46
58
|
* @memberof DeployModelWithStrategyBody
|
|
47
59
|
*/
|
|
48
60
|
params: any | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof DeployModelWithStrategyBody
|
|
65
|
+
*/
|
|
66
|
+
replicas?: number | null;
|
|
49
67
|
/**
|
|
50
68
|
* Selector for global vs tenant-scoped models
|
|
51
69
|
* @type {Scope}
|
|
@@ -26,11 +26,14 @@ function DeployModelWithStrategyBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
+
'deployment_modality': (0, _1.DeploymentModalityFromJSON)(json['deployment_modality']),
|
|
29
30
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
30
31
|
'model_author': json['model_author'],
|
|
31
32
|
'model_name': json['model_name'],
|
|
32
33
|
'name': json['name'],
|
|
34
|
+
'parallelism_strategies': !(0, runtime_1.exists)(json, 'parallelism_strategies') ? undefined : (json['parallelism_strategies'] === null ? null : json['parallelism_strategies'].map(_1.ParallelismStrategyFromJSON)),
|
|
33
35
|
'params': json['params'],
|
|
36
|
+
'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : json['replicas'],
|
|
34
37
|
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : (0, _1.ScopeFromJSON)(json['scope']),
|
|
35
38
|
};
|
|
36
39
|
}
|
|
@@ -42,11 +45,14 @@ function DeployModelWithStrategyBodyToJSON(value) {
|
|
|
42
45
|
return null;
|
|
43
46
|
}
|
|
44
47
|
return {
|
|
48
|
+
'deployment_modality': (0, _1.DeploymentModalityToJSON)(value.deployment_modality),
|
|
45
49
|
'description': value.description,
|
|
46
50
|
'model_author': value.model_author,
|
|
47
51
|
'model_name': value.model_name,
|
|
48
52
|
'name': value.name,
|
|
53
|
+
'parallelism_strategies': value.parallelism_strategies === undefined ? undefined : (value.parallelism_strategies === null ? null : value.parallelism_strategies.map(_1.ParallelismStrategyToJSON)),
|
|
49
54
|
'params': value.params,
|
|
55
|
+
'replicas': value.replicas,
|
|
50
56
|
'scope': (0, _1.ScopeToJSON)(value.scope),
|
|
51
57
|
};
|
|
52
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
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { Parameter, Platform, StrategyConfig } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -18,16 +18,22 @@ import { DeploymentModality, Parameter, Platform } from './';
|
|
|
18
18
|
export interface Strategy {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {
|
|
21
|
+
* @type {StrategyConfig}
|
|
22
22
|
* @memberof Strategy
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
config: StrategyConfig;
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
* @type {string}
|
|
28
28
|
* @memberof Strategy
|
|
29
29
|
*/
|
|
30
30
|
description?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof Strategy
|
|
35
|
+
*/
|
|
36
|
+
enabled: boolean;
|
|
31
37
|
/**
|
|
32
38
|
*
|
|
33
39
|
* @type {string}
|
package/dist/models/Strategy.js
CHANGED
|
@@ -26,8 +26,9 @@ function StrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
'
|
|
29
|
+
'config': (0, _1.StrategyConfigFromJSON)(json['config']),
|
|
30
30
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
31
|
+
'enabled': json['enabled'],
|
|
31
32
|
'name': json['name'],
|
|
32
33
|
'parameters': (json['parameters'].map(_1.ParameterFromJSON)),
|
|
33
34
|
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
@@ -41,8 +42,9 @@ function StrategyToJSON(value) {
|
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
return {
|
|
44
|
-
'
|
|
45
|
+
'config': (0, _1.StrategyConfigToJSON)(value.config),
|
|
45
46
|
'description': value.description,
|
|
47
|
+
'enabled': value.enabled,
|
|
46
48
|
'name': value.name,
|
|
47
49
|
'parameters': (value.parameters.map(_1.ParameterToJSON)),
|
|
48
50
|
'platform': (0, _1.PlatformToJSON)(value.platform),
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { DeploymentModality, ParallelismStrategy } from './';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface StrategyConfig
|
|
17
|
+
*/
|
|
18
|
+
export interface StrategyConfig {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof StrategyConfig
|
|
23
|
+
*/
|
|
24
|
+
max_replicas?: number | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof StrategyConfig
|
|
29
|
+
*/
|
|
30
|
+
max_ttl?: number | null;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof StrategyConfig
|
|
35
|
+
*/
|
|
36
|
+
min_replicas: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<DeploymentModality>}
|
|
40
|
+
* @memberof StrategyConfig
|
|
41
|
+
*/
|
|
42
|
+
supported_deployment_modalities: Array<DeploymentModality>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<ParallelismStrategy>}
|
|
46
|
+
* @memberof StrategyConfig
|
|
47
|
+
*/
|
|
48
|
+
supported_paralellism_strategies: Array<ParallelismStrategy>;
|
|
49
|
+
}
|
|
50
|
+
export declare function StrategyConfigFromJSON(json: any): StrategyConfig;
|
|
51
|
+
export declare function StrategyConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): StrategyConfig;
|
|
52
|
+
export declare function StrategyConfigToJSON(value?: StrategyConfig | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.StrategyConfigFromJSON = StrategyConfigFromJSON;
|
|
17
|
+
exports.StrategyConfigFromJSONTyped = StrategyConfigFromJSONTyped;
|
|
18
|
+
exports.StrategyConfigToJSON = StrategyConfigToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
var _1 = require("./");
|
|
21
|
+
function StrategyConfigFromJSON(json) {
|
|
22
|
+
return StrategyConfigFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
function StrategyConfigFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if ((json === undefined) || (json === null)) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'max_replicas': !(0, runtime_1.exists)(json, 'max_replicas') ? undefined : json['max_replicas'],
|
|
30
|
+
'max_ttl': !(0, runtime_1.exists)(json, 'max_ttl') ? undefined : json['max_ttl'],
|
|
31
|
+
'min_replicas': json['min_replicas'],
|
|
32
|
+
'supported_deployment_modalities': (json['supported_deployment_modalities'].map(_1.DeploymentModalityFromJSON)),
|
|
33
|
+
'supported_paralellism_strategies': (json['supported_paralellism_strategies'].map(_1.ParallelismStrategyFromJSON)),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function StrategyConfigToJSON(value) {
|
|
37
|
+
if (value === undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (value === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'max_replicas': value.max_replicas,
|
|
45
|
+
'max_ttl': value.max_ttl,
|
|
46
|
+
'min_replicas': value.min_replicas,
|
|
47
|
+
'supported_deployment_modalities': (value.supported_deployment_modalities.map(_1.DeploymentModalityToJSON)),
|
|
48
|
+
'supported_paralellism_strategies': (value.supported_paralellism_strategies.map(_1.ParallelismStrategyToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './Choice';
|
|
|
3
3
|
export * from './DeployModelWithStrategyBody';
|
|
4
4
|
export * from './DeploymentModality';
|
|
5
5
|
export * from './DesiredState';
|
|
6
|
-
export * from './GpuResource';
|
|
7
6
|
export * from './ListDeploymentStrategiesResponse';
|
|
8
7
|
export * from './ListModelDeploymentsResponse';
|
|
9
8
|
export * from './ModelDeployment';
|
|
@@ -17,10 +16,10 @@ export * from './Parameter';
|
|
|
17
16
|
export * from './ParameterType';
|
|
18
17
|
export * from './Platform';
|
|
19
18
|
export * from './ReplicaGroup';
|
|
20
|
-
export * from './ResourceRequirements';
|
|
21
19
|
export * from './RestApi';
|
|
22
20
|
export * from './Scope';
|
|
23
21
|
export * from './ServerErrorResponse';
|
|
24
22
|
export * from './State';
|
|
25
23
|
export * from './Strategy';
|
|
24
|
+
export * from './StrategyConfig';
|
|
26
25
|
export * from './Visibility';
|
package/dist/models/index.js
CHANGED
|
@@ -21,7 +21,6 @@ __exportStar(require("./Choice"), exports);
|
|
|
21
21
|
__exportStar(require("./DeployModelWithStrategyBody"), exports);
|
|
22
22
|
__exportStar(require("./DeploymentModality"), exports);
|
|
23
23
|
__exportStar(require("./DesiredState"), exports);
|
|
24
|
-
__exportStar(require("./GpuResource"), exports);
|
|
25
24
|
__exportStar(require("./ListDeploymentStrategiesResponse"), exports);
|
|
26
25
|
__exportStar(require("./ListModelDeploymentsResponse"), exports);
|
|
27
26
|
__exportStar(require("./ModelDeployment"), exports);
|
|
@@ -35,10 +34,10 @@ __exportStar(require("./Parameter"), exports);
|
|
|
35
34
|
__exportStar(require("./ParameterType"), exports);
|
|
36
35
|
__exportStar(require("./Platform"), exports);
|
|
37
36
|
__exportStar(require("./ReplicaGroup"), exports);
|
|
38
|
-
__exportStar(require("./ResourceRequirements"), exports);
|
|
39
37
|
__exportStar(require("./RestApi"), exports);
|
|
40
38
|
__exportStar(require("./Scope"), exports);
|
|
41
39
|
__exportStar(require("./ServerErrorResponse"), exports);
|
|
42
40
|
__exportStar(require("./State"), exports);
|
|
43
41
|
__exportStar(require("./Strategy"), exports);
|
|
42
|
+
__exportStar(require("./StrategyConfig"), exports);
|
|
44
43
|
__exportStar(require("./Visibility"), exports);
|
package/package.json
CHANGED
|
@@ -14,6 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
+
DeploymentModality,
|
|
18
|
+
DeploymentModalityFromJSON,
|
|
19
|
+
DeploymentModalityFromJSONTyped,
|
|
20
|
+
DeploymentModalityToJSON,
|
|
21
|
+
ParallelismStrategy,
|
|
22
|
+
ParallelismStrategyFromJSON,
|
|
23
|
+
ParallelismStrategyFromJSONTyped,
|
|
24
|
+
ParallelismStrategyToJSON,
|
|
17
25
|
Scope,
|
|
18
26
|
ScopeFromJSON,
|
|
19
27
|
ScopeFromJSONTyped,
|
|
@@ -26,6 +34,12 @@ import {
|
|
|
26
34
|
* @interface DeployModelWithStrategyBody
|
|
27
35
|
*/
|
|
28
36
|
export interface DeployModelWithStrategyBody {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {DeploymentModality}
|
|
40
|
+
* @memberof DeployModelWithStrategyBody
|
|
41
|
+
*/
|
|
42
|
+
deployment_modality: DeploymentModality;
|
|
29
43
|
/**
|
|
30
44
|
*
|
|
31
45
|
* @type {string}
|
|
@@ -50,12 +64,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
50
64
|
* @memberof DeployModelWithStrategyBody
|
|
51
65
|
*/
|
|
52
66
|
name: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {Array<ParallelismStrategy>}
|
|
70
|
+
* @memberof DeployModelWithStrategyBody
|
|
71
|
+
*/
|
|
72
|
+
parallelism_strategies?: Array<ParallelismStrategy> | null;
|
|
53
73
|
/**
|
|
54
74
|
*
|
|
55
75
|
* @type {any}
|
|
56
76
|
* @memberof DeployModelWithStrategyBody
|
|
57
77
|
*/
|
|
58
78
|
params: any | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof DeployModelWithStrategyBody
|
|
83
|
+
*/
|
|
84
|
+
replicas?: number | null;
|
|
59
85
|
/**
|
|
60
86
|
* Selector for global vs tenant-scoped models
|
|
61
87
|
* @type {Scope}
|
|
@@ -74,11 +100,14 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
|
|
|
74
100
|
}
|
|
75
101
|
return {
|
|
76
102
|
|
|
103
|
+
'deployment_modality': DeploymentModalityFromJSON(json['deployment_modality']),
|
|
77
104
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
78
105
|
'model_author': json['model_author'],
|
|
79
106
|
'model_name': json['model_name'],
|
|
80
107
|
'name': json['name'],
|
|
108
|
+
'parallelism_strategies': !exists(json, 'parallelism_strategies') ? undefined : (json['parallelism_strategies'] === null ? null : (json['parallelism_strategies'] as Array<any>).map(ParallelismStrategyFromJSON)),
|
|
81
109
|
'params': json['params'],
|
|
110
|
+
'replicas': !exists(json, 'replicas') ? undefined : json['replicas'],
|
|
82
111
|
'scope': !exists(json, 'scope') ? undefined : ScopeFromJSON(json['scope']),
|
|
83
112
|
};
|
|
84
113
|
}
|
|
@@ -92,11 +121,14 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
|
|
|
92
121
|
}
|
|
93
122
|
return {
|
|
94
123
|
|
|
124
|
+
'deployment_modality': DeploymentModalityToJSON(value.deployment_modality),
|
|
95
125
|
'description': value.description,
|
|
96
126
|
'model_author': value.model_author,
|
|
97
127
|
'model_name': value.model_name,
|
|
98
128
|
'name': value.name,
|
|
129
|
+
'parallelism_strategies': value.parallelism_strategies === undefined ? undefined : (value.parallelism_strategies === null ? null : (value.parallelism_strategies as Array<any>).map(ParallelismStrategyToJSON)),
|
|
99
130
|
'params': value.params,
|
|
131
|
+
'replicas': value.replicas,
|
|
100
132
|
'scope': ScopeToJSON(value.scope),
|
|
101
133
|
};
|
|
102
134
|
}
|
|
@@ -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/Strategy.ts
CHANGED
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
DeploymentModality,
|
|
18
|
-
DeploymentModalityFromJSON,
|
|
19
|
-
DeploymentModalityFromJSONTyped,
|
|
20
|
-
DeploymentModalityToJSON,
|
|
21
17
|
Parameter,
|
|
22
18
|
ParameterFromJSON,
|
|
23
19
|
ParameterFromJSONTyped,
|
|
@@ -26,6 +22,10 @@ import {
|
|
|
26
22
|
PlatformFromJSON,
|
|
27
23
|
PlatformFromJSONTyped,
|
|
28
24
|
PlatformToJSON,
|
|
25
|
+
StrategyConfig,
|
|
26
|
+
StrategyConfigFromJSON,
|
|
27
|
+
StrategyConfigFromJSONTyped,
|
|
28
|
+
StrategyConfigToJSON,
|
|
29
29
|
} from './';
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -36,16 +36,22 @@ import {
|
|
|
36
36
|
export interface Strategy {
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {StrategyConfig}
|
|
40
40
|
* @memberof Strategy
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
config: StrategyConfig;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {string}
|
|
46
46
|
* @memberof Strategy
|
|
47
47
|
*/
|
|
48
48
|
description?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof Strategy
|
|
53
|
+
*/
|
|
54
|
+
enabled: boolean;
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
51
57
|
* @type {string}
|
|
@@ -76,8 +82,9 @@ export function StrategyFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
76
82
|
}
|
|
77
83
|
return {
|
|
78
84
|
|
|
79
|
-
'
|
|
85
|
+
'config': StrategyConfigFromJSON(json['config']),
|
|
80
86
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
87
|
+
'enabled': json['enabled'],
|
|
81
88
|
'name': json['name'],
|
|
82
89
|
'parameters': ((json['parameters'] as Array<any>).map(ParameterFromJSON)),
|
|
83
90
|
'platform': PlatformFromJSON(json['platform']),
|
|
@@ -93,8 +100,9 @@ export function StrategyToJSON(value?: Strategy | null): any {
|
|
|
93
100
|
}
|
|
94
101
|
return {
|
|
95
102
|
|
|
96
|
-
'
|
|
103
|
+
'config': StrategyConfigToJSON(value.config),
|
|
97
104
|
'description': value.description,
|
|
105
|
+
'enabled': value.enabled,
|
|
98
106
|
'name': value.name,
|
|
99
107
|
'parameters': ((value.parameters as Array<any>).map(ParameterToJSON)),
|
|
100
108
|
'platform': PlatformToJSON(value.platform),
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
DeploymentModality,
|
|
18
|
+
DeploymentModalityFromJSON,
|
|
19
|
+
DeploymentModalityFromJSONTyped,
|
|
20
|
+
DeploymentModalityToJSON,
|
|
21
|
+
ParallelismStrategy,
|
|
22
|
+
ParallelismStrategyFromJSON,
|
|
23
|
+
ParallelismStrategyFromJSONTyped,
|
|
24
|
+
ParallelismStrategyToJSON,
|
|
25
|
+
} from './';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @interface StrategyConfig
|
|
31
|
+
*/
|
|
32
|
+
export interface StrategyConfig {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {number}
|
|
36
|
+
* @memberof StrategyConfig
|
|
37
|
+
*/
|
|
38
|
+
max_replicas?: number | null;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof StrategyConfig
|
|
43
|
+
*/
|
|
44
|
+
max_ttl?: number | null;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof StrategyConfig
|
|
49
|
+
*/
|
|
50
|
+
min_replicas: number;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {Array<DeploymentModality>}
|
|
54
|
+
* @memberof StrategyConfig
|
|
55
|
+
*/
|
|
56
|
+
supported_deployment_modalities: Array<DeploymentModality>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {Array<ParallelismStrategy>}
|
|
60
|
+
* @memberof StrategyConfig
|
|
61
|
+
*/
|
|
62
|
+
supported_paralellism_strategies: Array<ParallelismStrategy>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function StrategyConfigFromJSON(json: any): StrategyConfig {
|
|
66
|
+
return StrategyConfigFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function StrategyConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): StrategyConfig {
|
|
70
|
+
if ((json === undefined) || (json === null)) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'max_replicas': !exists(json, 'max_replicas') ? undefined : json['max_replicas'],
|
|
76
|
+
'max_ttl': !exists(json, 'max_ttl') ? undefined : json['max_ttl'],
|
|
77
|
+
'min_replicas': json['min_replicas'],
|
|
78
|
+
'supported_deployment_modalities': ((json['supported_deployment_modalities'] as Array<any>).map(DeploymentModalityFromJSON)),
|
|
79
|
+
'supported_paralellism_strategies': ((json['supported_paralellism_strategies'] as Array<any>).map(ParallelismStrategyFromJSON)),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function StrategyConfigToJSON(value?: StrategyConfig | null): any {
|
|
84
|
+
if (value === undefined) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
if (value === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'max_replicas': value.max_replicas,
|
|
93
|
+
'max_ttl': value.max_ttl,
|
|
94
|
+
'min_replicas': value.min_replicas,
|
|
95
|
+
'supported_deployment_modalities': ((value.supported_deployment_modalities as Array<any>).map(DeploymentModalityToJSON)),
|
|
96
|
+
'supported_paralellism_strategies': ((value.supported_paralellism_strategies as Array<any>).map(ParallelismStrategyToJSON)),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './Choice';
|
|
|
5
5
|
export * from './DeployModelWithStrategyBody';
|
|
6
6
|
export * from './DeploymentModality';
|
|
7
7
|
export * from './DesiredState';
|
|
8
|
-
export * from './GpuResource';
|
|
9
8
|
export * from './ListDeploymentStrategiesResponse';
|
|
10
9
|
export * from './ListModelDeploymentsResponse';
|
|
11
10
|
export * from './ModelDeployment';
|
|
@@ -19,10 +18,10 @@ export * from './Parameter';
|
|
|
19
18
|
export * from './ParameterType';
|
|
20
19
|
export * from './Platform';
|
|
21
20
|
export * from './ReplicaGroup';
|
|
22
|
-
export * from './ResourceRequirements';
|
|
23
21
|
export * from './RestApi';
|
|
24
22
|
export * from './Scope';
|
|
25
23
|
export * from './ServerErrorResponse';
|
|
26
24
|
export * from './State';
|
|
27
25
|
export * from './Strategy';
|
|
26
|
+
export * from './StrategyConfig';
|
|
28
27
|
export * from './Visibility';
|
|
@@ -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
|
-
|