@mlhub/deployments-ts-sdk 0.7.0 → 0.9.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 -5
- package/README.md +2 -2
- package/dist/apis/DeploymentsApi.d.ts +3 -1
- package/dist/apis/DeploymentsApi.js +9 -6
- package/dist/models/DeployModelWithStrategyBody.d.ts +19 -0
- package/dist/models/DeployModelWithStrategyBody.js +8 -0
- package/dist/models/ListDeploymentStrategiesResponse.d.ts +3 -3
- package/dist/models/ListDeploymentStrategiesResponse.js +2 -2
- package/dist/models/ModelDeployment.d.ts +12 -0
- package/dist/models/ModelDeployment.js +4 -0
- package/dist/models/Scope.d.ts +23 -0
- package/dist/models/Scope.js +38 -0
- package/dist/models/Strategy.d.ts +5 -5
- package/dist/models/Strategy.js +4 -4
- package/dist/models/index.d.ts +1 -5
- package/dist/models/index.js +1 -5
- package/package.json +1 -1
- package/src/apis/DeploymentsApi.ts +14 -8
- package/src/models/DeployModelWithStrategyBody.ts +31 -0
- package/src/models/ListDeploymentStrategiesResponse.ts +8 -8
- package/src/models/ModelDeployment.ts +16 -0
- package/src/models/Scope.ts +36 -0
- package/src/models/Strategy.ts +16 -16
- package/src/models/index.ts +1 -5
- package/dist/models/ClientStrategySet.d.ts +0 -52
- package/dist/models/ClientStrategySet.js +0 -50
- package/dist/models/Operator.d.ts +0 -33
- package/dist/models/Operator.js +0 -48
- package/dist/models/ParameterSet.d.ts +0 -34
- package/dist/models/ParameterSet.js +0 -43
- package/dist/models/Rule.d.ts +0 -40
- package/dist/models/Rule.js +0 -45
- package/dist/models/RuleSet.d.ts +0 -34
- package/dist/models/RuleSet.js +0 -43
- package/src/models/ClientStrategySet.ts +0 -107
- package/src/models/Operator.ts +0 -46
- package/src/models/ParameterSet.ts +0 -71
- package/src/models/Rule.ts +0 -79
- package/src/models/RuleSet.ts +0 -71
package/.openapi-generator/FILES
CHANGED
|
@@ -8,7 +8,6 @@ src/apis/StrategiesApi.ts
|
|
|
8
8
|
src/apis/index.ts
|
|
9
9
|
src/index.ts
|
|
10
10
|
src/models/BadRequestResponse.ts
|
|
11
|
-
src/models/ClientStrategySet.ts
|
|
12
11
|
src/models/DeployModelWithStrategyBody.ts
|
|
13
12
|
src/models/DesiredState.ts
|
|
14
13
|
src/models/GpuResource.ts
|
|
@@ -19,17 +18,14 @@ src/models/ModelDeploymentInterfaceOneOf.ts
|
|
|
19
18
|
src/models/ModelDeploymentResponse.ts
|
|
20
19
|
src/models/ModelReference.ts
|
|
21
20
|
src/models/NotFoundResponse.ts
|
|
22
|
-
src/models/Operator.ts
|
|
23
21
|
src/models/ParallelismStrategy.ts
|
|
24
22
|
src/models/Parameter.ts
|
|
25
|
-
src/models/ParameterSet.ts
|
|
26
23
|
src/models/ParameterType.ts
|
|
27
24
|
src/models/Platform.ts
|
|
28
25
|
src/models/ReplicaGroup.ts
|
|
29
26
|
src/models/ResourceRequirements.ts
|
|
30
27
|
src/models/RestApi.ts
|
|
31
|
-
src/models/
|
|
32
|
-
src/models/RuleSet.ts
|
|
28
|
+
src/models/Scope.ts
|
|
33
29
|
src/models/ServerErrorResponse.ts
|
|
34
30
|
src/models/State.ts
|
|
35
31
|
src/models/Strategy.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-ts-sdk@0.9.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.9.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -14,10 +14,12 @@ import { DeployModelWithStrategyBody, ModelDeploymentResponse, Platform } from '
|
|
|
14
14
|
export interface DeployModelWithStrategyRequest {
|
|
15
15
|
platform: Platform;
|
|
16
16
|
strategyName: string;
|
|
17
|
-
|
|
17
|
+
name: string;
|
|
18
|
+
description: string | null;
|
|
18
19
|
modelName: string;
|
|
19
20
|
modelAuthor: string;
|
|
20
21
|
params: any;
|
|
22
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
21
23
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
22
24
|
}
|
|
23
25
|
export interface StartModelDeploymentRequest {
|
|
@@ -90,8 +90,11 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
90
90
|
if (requestParameters.strategyName === null || requestParameters.strategyName === undefined) {
|
|
91
91
|
throw new runtime.RequiredError('strategyName', 'Required parameter requestParameters.strategyName was null or undefined when calling deployModelWithStrategy.');
|
|
92
92
|
}
|
|
93
|
-
if (requestParameters.
|
|
94
|
-
throw new runtime.RequiredError('
|
|
93
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
94
|
+
throw new runtime.RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling deployModelWithStrategy.');
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters.description === null || requestParameters.description === undefined) {
|
|
97
|
+
throw new runtime.RequiredError('description', 'Required parameter requestParameters.description was null or undefined when calling deployModelWithStrategy.');
|
|
95
98
|
}
|
|
96
99
|
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
97
100
|
throw new runtime.RequiredError('modelName', 'Required parameter requestParameters.modelName was null or undefined when calling deployModelWithStrategy.');
|
|
@@ -102,17 +105,17 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
102
105
|
if (requestParameters.params === null || requestParameters.params === undefined) {
|
|
103
106
|
throw new runtime.RequiredError('params', 'Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
104
107
|
}
|
|
108
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
109
|
+
throw new runtime.RequiredError('scope', 'Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
110
|
+
}
|
|
105
111
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
106
112
|
throw new runtime.RequiredError('deployModelWithStrategyBody', 'Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
107
113
|
}
|
|
108
114
|
queryParameters = {};
|
|
109
|
-
if (requestParameters.scope !== undefined) {
|
|
110
|
-
queryParameters['scope'] = requestParameters.scope;
|
|
111
|
-
}
|
|
112
115
|
headerParameters = {};
|
|
113
116
|
headerParameters['Content-Type'] = 'application/json';
|
|
114
117
|
return [4 /*yield*/, this.request({
|
|
115
|
-
path: "/deployments-api/platforms/{platform}/strategies/{strategy_name}".replace("{".concat("platform", "}"), encodeURIComponent(String(requestParameters.platform))).replace("{".concat("strategy_name", "}"), encodeURIComponent(String(requestParameters.strategyName))).replace("{".concat("model_name", "}"), encodeURIComponent(String(requestParameters.modelName))).replace("{".concat("model_author", "}"), encodeURIComponent(String(requestParameters.modelAuthor))).replace("{".concat("params", "}"), encodeURIComponent(String(requestParameters.params))),
|
|
118
|
+
path: "/deployments-api/platforms/{platform}/strategies/{strategy_name}".replace("{".concat("platform", "}"), encodeURIComponent(String(requestParameters.platform))).replace("{".concat("strategy_name", "}"), encodeURIComponent(String(requestParameters.strategyName))).replace("{".concat("name", "}"), encodeURIComponent(String(requestParameters.name))).replace("{".concat("description", "}"), encodeURIComponent(String(requestParameters.description))).replace("{".concat("model_name", "}"), encodeURIComponent(String(requestParameters.modelName))).replace("{".concat("model_author", "}"), encodeURIComponent(String(requestParameters.modelAuthor))).replace("{".concat("params", "}"), encodeURIComponent(String(requestParameters.params))).replace("{".concat("scope", "}"), encodeURIComponent(String(requestParameters.scope))),
|
|
116
119
|
method: 'POST',
|
|
117
120
|
headers: headerParameters,
|
|
118
121
|
query: queryParameters,
|
|
@@ -9,12 +9,19 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { Scope } from './';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
15
16
|
* @interface DeployModelWithStrategyBody
|
|
16
17
|
*/
|
|
17
18
|
export interface DeployModelWithStrategyBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof DeployModelWithStrategyBody
|
|
23
|
+
*/
|
|
24
|
+
description?: string | null;
|
|
18
25
|
/**
|
|
19
26
|
*
|
|
20
27
|
* @type {string}
|
|
@@ -27,12 +34,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
27
34
|
* @memberof DeployModelWithStrategyBody
|
|
28
35
|
*/
|
|
29
36
|
model_name: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof DeployModelWithStrategyBody
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
30
43
|
/**
|
|
31
44
|
*
|
|
32
45
|
* @type {any}
|
|
33
46
|
* @memberof DeployModelWithStrategyBody
|
|
34
47
|
*/
|
|
35
48
|
params: any | null;
|
|
49
|
+
/**
|
|
50
|
+
* Selector for global vs tenant-scoped models
|
|
51
|
+
* @type {Scope}
|
|
52
|
+
* @memberof DeployModelWithStrategyBody
|
|
53
|
+
*/
|
|
54
|
+
scope?: Scope | null;
|
|
36
55
|
}
|
|
37
56
|
export declare function DeployModelWithStrategyBodyFromJSON(json: any): DeployModelWithStrategyBody;
|
|
38
57
|
export declare function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeployModelWithStrategyBody;
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.DeployModelWithStrategyBodyFromJSON = DeployModelWithStrategyBodyFromJSON;
|
|
17
17
|
exports.DeployModelWithStrategyBodyFromJSONTyped = DeployModelWithStrategyBodyFromJSONTyped;
|
|
18
18
|
exports.DeployModelWithStrategyBodyToJSON = DeployModelWithStrategyBodyToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
var _1 = require("./");
|
|
19
21
|
function DeployModelWithStrategyBodyFromJSON(json) {
|
|
20
22
|
return DeployModelWithStrategyBodyFromJSONTyped(json, false);
|
|
21
23
|
}
|
|
@@ -24,9 +26,12 @@ function DeployModelWithStrategyBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
26
|
return json;
|
|
25
27
|
}
|
|
26
28
|
return {
|
|
29
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
27
30
|
'model_author': json['model_author'],
|
|
28
31
|
'model_name': json['model_name'],
|
|
32
|
+
'name': json['name'],
|
|
29
33
|
'params': json['params'],
|
|
34
|
+
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : (0, _1.ScopeFromJSON)(json['scope']),
|
|
30
35
|
};
|
|
31
36
|
}
|
|
32
37
|
function DeployModelWithStrategyBodyToJSON(value) {
|
|
@@ -37,8 +42,11 @@ function DeployModelWithStrategyBodyToJSON(value) {
|
|
|
37
42
|
return null;
|
|
38
43
|
}
|
|
39
44
|
return {
|
|
45
|
+
'description': value.description,
|
|
40
46
|
'model_author': value.model_author,
|
|
41
47
|
'model_name': value.model_name,
|
|
48
|
+
'name': value.name,
|
|
42
49
|
'params': value.params,
|
|
50
|
+
'scope': (0, _1.ScopeToJSON)(value.scope),
|
|
43
51
|
};
|
|
44
52
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { Strategy } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -30,10 +30,10 @@ export interface ListDeploymentStrategiesResponse {
|
|
|
30
30
|
metadata: object;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
-
* @type {Array<
|
|
33
|
+
* @type {Array<Strategy>}
|
|
34
34
|
* @memberof ListDeploymentStrategiesResponse
|
|
35
35
|
*/
|
|
36
|
-
result: Array<
|
|
36
|
+
result: Array<Strategy>;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
39
|
* @type {number}
|
|
@@ -27,7 +27,7 @@ function ListDeploymentStrategiesResponseFromJSONTyped(json, ignoreDiscriminator
|
|
|
27
27
|
return {
|
|
28
28
|
'message': json['message'],
|
|
29
29
|
'metadata': json['metadata'],
|
|
30
|
-
'result': (json['result'].map(_1.
|
|
30
|
+
'result': (json['result'].map(_1.StrategyFromJSON)),
|
|
31
31
|
'status': json['status'],
|
|
32
32
|
'version': json['version'],
|
|
33
33
|
};
|
|
@@ -42,7 +42,7 @@ function ListDeploymentStrategiesResponseToJSON(value) {
|
|
|
42
42
|
return {
|
|
43
43
|
'message': value.message,
|
|
44
44
|
'metadata': value.metadata,
|
|
45
|
-
'result': (value.result.map(_1.
|
|
45
|
+
'result': (value.result.map(_1.StrategyToJSON)),
|
|
46
46
|
'status': value.status,
|
|
47
47
|
'version': value.version,
|
|
48
48
|
};
|
|
@@ -34,6 +34,12 @@ export interface ModelDeployment {
|
|
|
34
34
|
* @memberof ModelDeployment
|
|
35
35
|
*/
|
|
36
36
|
deployment_strategy?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ModelDeployment
|
|
41
|
+
*/
|
|
42
|
+
description?: string | null;
|
|
37
43
|
/**
|
|
38
44
|
*
|
|
39
45
|
* @type {DesiredState}
|
|
@@ -84,6 +90,12 @@ export interface ModelDeployment {
|
|
|
84
90
|
* @memberof ModelDeployment
|
|
85
91
|
*/
|
|
86
92
|
model: ModelReference;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof ModelDeployment
|
|
97
|
+
*/
|
|
98
|
+
name: string;
|
|
87
99
|
/**
|
|
88
100
|
*
|
|
89
101
|
* @type {string}
|
|
@@ -29,6 +29,7 @@ function ModelDeploymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
29
|
'created_at': json['created_at'],
|
|
30
30
|
'deployment_interface': !(0, runtime_1.exists)(json, 'deployment_interface') ? undefined : (0, _1.ModelDeploymentInterfaceFromJSON)(json['deployment_interface']),
|
|
31
31
|
'deployment_strategy': !(0, runtime_1.exists)(json, 'deployment_strategy') ? undefined : json['deployment_strategy'],
|
|
32
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
32
33
|
'desired_state': (0, _1.DesiredStateFromJSON)(json['desired_state']),
|
|
33
34
|
'id': json['id'],
|
|
34
35
|
'last_desired_state_change': json['last_desired_state_change'],
|
|
@@ -37,6 +38,7 @@ function ModelDeploymentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
38
|
'last_state_change': json['last_state_change'],
|
|
38
39
|
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : json['metadata'],
|
|
39
40
|
'model': (0, _1.ModelReferenceFromJSON)(json['model']),
|
|
41
|
+
'name': json['name'],
|
|
40
42
|
'owner': json['owner'],
|
|
41
43
|
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
42
44
|
'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : (0, _1.ReplicaGroupFromJSON)(json['replicas']),
|
|
@@ -56,6 +58,7 @@ function ModelDeploymentToJSON(value) {
|
|
|
56
58
|
'created_at': value.created_at,
|
|
57
59
|
'deployment_interface': (0, _1.ModelDeploymentInterfaceToJSON)(value.deployment_interface),
|
|
58
60
|
'deployment_strategy': value.deployment_strategy,
|
|
61
|
+
'description': value.description,
|
|
59
62
|
'desired_state': (0, _1.DesiredStateToJSON)(value.desired_state),
|
|
60
63
|
'id': value.id,
|
|
61
64
|
'last_desired_state_change': value.last_desired_state_change,
|
|
@@ -64,6 +67,7 @@ function ModelDeploymentToJSON(value) {
|
|
|
64
67
|
'last_state_change': value.last_state_change,
|
|
65
68
|
'metadata': value.metadata,
|
|
66
69
|
'model': (0, _1.ModelReferenceToJSON)(value.model),
|
|
70
|
+
'name': value.name,
|
|
67
71
|
'owner': value.owner,
|
|
68
72
|
'platform': (0, _1.PlatformToJSON)(value.platform),
|
|
69
73
|
'replicas': (0, _1.ReplicaGroupToJSON)(value.replicas),
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
* @enum {string}
|
|
16
|
+
*/
|
|
17
|
+
export declare enum Scope {
|
|
18
|
+
Tenant = "tenant",
|
|
19
|
+
Global = "global"
|
|
20
|
+
}
|
|
21
|
+
export declare function ScopeFromJSON(json: any): Scope;
|
|
22
|
+
export declare function ScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Scope;
|
|
23
|
+
export declare function ScopeToJSON(value?: Scope | null): any;
|
|
@@ -0,0 +1,38 @@
|
|
|
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.Scope = void 0;
|
|
17
|
+
exports.ScopeFromJSON = ScopeFromJSON;
|
|
18
|
+
exports.ScopeFromJSONTyped = ScopeFromJSONTyped;
|
|
19
|
+
exports.ScopeToJSON = ScopeToJSON;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @enum {string}
|
|
24
|
+
*/
|
|
25
|
+
var Scope;
|
|
26
|
+
(function (Scope) {
|
|
27
|
+
Scope["Tenant"] = "tenant";
|
|
28
|
+
Scope["Global"] = "global";
|
|
29
|
+
})(Scope || (exports.Scope = Scope = {}));
|
|
30
|
+
function ScopeFromJSON(json) {
|
|
31
|
+
return ScopeFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ScopeFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
function ScopeToJSON(value) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
@@ -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 } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -30,16 +30,16 @@ export interface Strategy {
|
|
|
30
30
|
name: string;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
-
* @type {
|
|
33
|
+
* @type {Array<Parameter>}
|
|
34
34
|
* @memberof Strategy
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
parameters: Array<Parameter>;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {Platform}
|
|
40
40
|
* @memberof Strategy
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
platform: Platform;
|
|
43
43
|
}
|
|
44
44
|
export declare function StrategyFromJSON(json: any): Strategy;
|
|
45
45
|
export declare function StrategyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Strategy;
|
package/dist/models/Strategy.js
CHANGED
|
@@ -28,8 +28,8 @@ function StrategyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
28
28
|
return {
|
|
29
29
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
30
30
|
'name': json['name'],
|
|
31
|
-
'
|
|
32
|
-
'
|
|
31
|
+
'parameters': (json['parameters'].map(_1.ParameterFromJSON)),
|
|
32
|
+
'platform': (0, _1.PlatformFromJSON)(json['platform']),
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function StrategyToJSON(value) {
|
|
@@ -42,7 +42,7 @@ function StrategyToJSON(value) {
|
|
|
42
42
|
return {
|
|
43
43
|
'description': value.description,
|
|
44
44
|
'name': value.name,
|
|
45
|
-
'
|
|
46
|
-
'
|
|
45
|
+
'parameters': (value.parameters.map(_1.ParameterToJSON)),
|
|
46
|
+
'platform': (0, _1.PlatformToJSON)(value.platform),
|
|
47
47
|
};
|
|
48
48
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './BadRequestResponse';
|
|
2
|
-
export * from './ClientStrategySet';
|
|
3
2
|
export * from './DeployModelWithStrategyBody';
|
|
4
3
|
export * from './DesiredState';
|
|
5
4
|
export * from './GpuResource';
|
|
@@ -10,17 +9,14 @@ export * from './ModelDeploymentInterfaceOneOf';
|
|
|
10
9
|
export * from './ModelDeploymentResponse';
|
|
11
10
|
export * from './ModelReference';
|
|
12
11
|
export * from './NotFoundResponse';
|
|
13
|
-
export * from './Operator';
|
|
14
12
|
export * from './ParallelismStrategy';
|
|
15
13
|
export * from './Parameter';
|
|
16
|
-
export * from './ParameterSet';
|
|
17
14
|
export * from './ParameterType';
|
|
18
15
|
export * from './Platform';
|
|
19
16
|
export * from './ReplicaGroup';
|
|
20
17
|
export * from './ResourceRequirements';
|
|
21
18
|
export * from './RestApi';
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './RuleSet';
|
|
19
|
+
export * from './Scope';
|
|
24
20
|
export * from './ServerErrorResponse';
|
|
25
21
|
export * from './State';
|
|
26
22
|
export * from './Strategy';
|
package/dist/models/index.js
CHANGED
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./BadRequestResponse"), exports);
|
|
20
|
-
__exportStar(require("./ClientStrategySet"), exports);
|
|
21
20
|
__exportStar(require("./DeployModelWithStrategyBody"), exports);
|
|
22
21
|
__exportStar(require("./DesiredState"), exports);
|
|
23
22
|
__exportStar(require("./GpuResource"), exports);
|
|
@@ -28,17 +27,14 @@ __exportStar(require("./ModelDeploymentInterfaceOneOf"), exports);
|
|
|
28
27
|
__exportStar(require("./ModelDeploymentResponse"), exports);
|
|
29
28
|
__exportStar(require("./ModelReference"), exports);
|
|
30
29
|
__exportStar(require("./NotFoundResponse"), exports);
|
|
31
|
-
__exportStar(require("./Operator"), exports);
|
|
32
30
|
__exportStar(require("./ParallelismStrategy"), exports);
|
|
33
31
|
__exportStar(require("./Parameter"), exports);
|
|
34
|
-
__exportStar(require("./ParameterSet"), exports);
|
|
35
32
|
__exportStar(require("./ParameterType"), exports);
|
|
36
33
|
__exportStar(require("./Platform"), exports);
|
|
37
34
|
__exportStar(require("./ReplicaGroup"), exports);
|
|
38
35
|
__exportStar(require("./ResourceRequirements"), exports);
|
|
39
36
|
__exportStar(require("./RestApi"), exports);
|
|
40
|
-
__exportStar(require("./
|
|
41
|
-
__exportStar(require("./RuleSet"), exports);
|
|
37
|
+
__exportStar(require("./Scope"), exports);
|
|
42
38
|
__exportStar(require("./ServerErrorResponse"), exports);
|
|
43
39
|
__exportStar(require("./State"), exports);
|
|
44
40
|
__exportStar(require("./Strategy"), exports);
|
package/package.json
CHANGED
|
@@ -38,10 +38,12 @@ import {
|
|
|
38
38
|
export interface DeployModelWithStrategyRequest {
|
|
39
39
|
platform: Platform;
|
|
40
40
|
strategyName: string;
|
|
41
|
-
|
|
41
|
+
name: string;
|
|
42
|
+
description: string | null;
|
|
42
43
|
modelName: string;
|
|
43
44
|
modelAuthor: string;
|
|
44
45
|
params: any;
|
|
46
|
+
scope: DeployModelWithStrategyScopeEnum;
|
|
45
47
|
deployModelWithStrategyBody: DeployModelWithStrategyBody;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -74,8 +76,12 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
74
76
|
throw new runtime.RequiredError('strategyName','Required parameter requestParameters.strategyName was null or undefined when calling deployModelWithStrategy.');
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
if (requestParameters.
|
|
78
|
-
throw new runtime.RequiredError('
|
|
79
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
80
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deployModelWithStrategy.');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (requestParameters.description === null || requestParameters.description === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('description','Required parameter requestParameters.description was null or undefined when calling deployModelWithStrategy.');
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
if (requestParameters.modelName === null || requestParameters.modelName === undefined) {
|
|
@@ -90,22 +96,22 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
90
96
|
throw new runtime.RequiredError('params','Required parameter requestParameters.params was null or undefined when calling deployModelWithStrategy.');
|
|
91
97
|
}
|
|
92
98
|
|
|
99
|
+
if (requestParameters.scope === null || requestParameters.scope === undefined) {
|
|
100
|
+
throw new runtime.RequiredError('scope','Required parameter requestParameters.scope was null or undefined when calling deployModelWithStrategy.');
|
|
101
|
+
}
|
|
102
|
+
|
|
93
103
|
if (requestParameters.deployModelWithStrategyBody === null || requestParameters.deployModelWithStrategyBody === undefined) {
|
|
94
104
|
throw new runtime.RequiredError('deployModelWithStrategyBody','Required parameter requestParameters.deployModelWithStrategyBody was null or undefined when calling deployModelWithStrategy.');
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
const queryParameters: any = {};
|
|
98
108
|
|
|
99
|
-
if (requestParameters.scope !== undefined) {
|
|
100
|
-
queryParameters['scope'] = requestParameters.scope;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
109
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
104
110
|
|
|
105
111
|
headerParameters['Content-Type'] = 'application/json';
|
|
106
112
|
|
|
107
113
|
const response = await this.request({
|
|
108
|
-
path: `/deployments-api/platforms/{platform}/strategies/{strategy_name}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"strategy_name"}}`, encodeURIComponent(String(requestParameters.strategyName))).replace(`{${"model_name"}}`, encodeURIComponent(String(requestParameters.modelName))).replace(`{${"model_author"}}`, encodeURIComponent(String(requestParameters.modelAuthor))).replace(`{${"params"}}`, encodeURIComponent(String(requestParameters.params))),
|
|
114
|
+
path: `/deployments-api/platforms/{platform}/strategies/{strategy_name}`.replace(`{${"platform"}}`, encodeURIComponent(String(requestParameters.platform))).replace(`{${"strategy_name"}}`, encodeURIComponent(String(requestParameters.strategyName))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))).replace(`{${"description"}}`, encodeURIComponent(String(requestParameters.description))).replace(`{${"model_name"}}`, encodeURIComponent(String(requestParameters.modelName))).replace(`{${"model_author"}}`, encodeURIComponent(String(requestParameters.modelAuthor))).replace(`{${"params"}}`, encodeURIComponent(String(requestParameters.params))).replace(`{${"scope"}}`, encodeURIComponent(String(requestParameters.scope))),
|
|
109
115
|
method: 'POST',
|
|
110
116
|
headers: headerParameters,
|
|
111
117
|
query: queryParameters,
|
|
@@ -13,12 +13,25 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
Scope,
|
|
18
|
+
ScopeFromJSON,
|
|
19
|
+
ScopeFromJSONTyped,
|
|
20
|
+
ScopeToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
19
26
|
* @interface DeployModelWithStrategyBody
|
|
20
27
|
*/
|
|
21
28
|
export interface DeployModelWithStrategyBody {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof DeployModelWithStrategyBody
|
|
33
|
+
*/
|
|
34
|
+
description?: string | null;
|
|
22
35
|
/**
|
|
23
36
|
*
|
|
24
37
|
* @type {string}
|
|
@@ -31,12 +44,24 @@ export interface DeployModelWithStrategyBody {
|
|
|
31
44
|
* @memberof DeployModelWithStrategyBody
|
|
32
45
|
*/
|
|
33
46
|
model_name: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof DeployModelWithStrategyBody
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
34
53
|
/**
|
|
35
54
|
*
|
|
36
55
|
* @type {any}
|
|
37
56
|
* @memberof DeployModelWithStrategyBody
|
|
38
57
|
*/
|
|
39
58
|
params: any | null;
|
|
59
|
+
/**
|
|
60
|
+
* Selector for global vs tenant-scoped models
|
|
61
|
+
* @type {Scope}
|
|
62
|
+
* @memberof DeployModelWithStrategyBody
|
|
63
|
+
*/
|
|
64
|
+
scope?: Scope | null;
|
|
40
65
|
}
|
|
41
66
|
|
|
42
67
|
export function DeployModelWithStrategyBodyFromJSON(json: any): DeployModelWithStrategyBody {
|
|
@@ -49,9 +74,12 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
|
|
|
49
74
|
}
|
|
50
75
|
return {
|
|
51
76
|
|
|
77
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
52
78
|
'model_author': json['model_author'],
|
|
53
79
|
'model_name': json['model_name'],
|
|
80
|
+
'name': json['name'],
|
|
54
81
|
'params': json['params'],
|
|
82
|
+
'scope': !exists(json, 'scope') ? undefined : ScopeFromJSON(json['scope']),
|
|
55
83
|
};
|
|
56
84
|
}
|
|
57
85
|
|
|
@@ -64,9 +92,12 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
|
|
|
64
92
|
}
|
|
65
93
|
return {
|
|
66
94
|
|
|
95
|
+
'description': value.description,
|
|
67
96
|
'model_author': value.model_author,
|
|
68
97
|
'model_name': value.model_name,
|
|
98
|
+
'name': value.name,
|
|
69
99
|
'params': value.params,
|
|
100
|
+
'scope': ScopeToJSON(value.scope),
|
|
70
101
|
};
|
|
71
102
|
}
|
|
72
103
|
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Strategy,
|
|
18
|
+
StrategyFromJSON,
|
|
19
|
+
StrategyFromJSONTyped,
|
|
20
|
+
StrategyToJSON,
|
|
21
21
|
} from './';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -40,10 +40,10 @@ export interface ListDeploymentStrategiesResponse {
|
|
|
40
40
|
metadata: object;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
|
-
* @type {Array<
|
|
43
|
+
* @type {Array<Strategy>}
|
|
44
44
|
* @memberof ListDeploymentStrategiesResponse
|
|
45
45
|
*/
|
|
46
|
-
result: Array<
|
|
46
|
+
result: Array<Strategy>;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {number}
|
|
@@ -70,7 +70,7 @@ export function ListDeploymentStrategiesResponseFromJSONTyped(json: any, ignoreD
|
|
|
70
70
|
|
|
71
71
|
'message': json['message'],
|
|
72
72
|
'metadata': json['metadata'],
|
|
73
|
-
'result': ((json['result'] as Array<any>).map(
|
|
73
|
+
'result': ((json['result'] as Array<any>).map(StrategyFromJSON)),
|
|
74
74
|
'status': json['status'],
|
|
75
75
|
'version': json['version'],
|
|
76
76
|
};
|
|
@@ -87,7 +87,7 @@ export function ListDeploymentStrategiesResponseToJSON(value?: ListDeploymentStr
|
|
|
87
87
|
|
|
88
88
|
'message': value.message,
|
|
89
89
|
'metadata': value.metadata,
|
|
90
|
-
'result': ((value.result as Array<any>).map(
|
|
90
|
+
'result': ((value.result as Array<any>).map(StrategyToJSON)),
|
|
91
91
|
'status': value.status,
|
|
92
92
|
'version': value.version,
|
|
93
93
|
};
|