@mlhub/deployments-ts-sdk 0.11.0 → 0.13.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 +3 -0
- package/README.md +2 -2
- package/dist/apis/DeploymentsApi.d.ts +9 -1
- package/dist/apis/DeploymentsApi.js +41 -0
- package/dist/models/Choice.d.ts +39 -0
- package/dist/models/Choice.js +45 -0
- package/dist/models/DeployModelWithStrategyBody.d.ts +7 -1
- package/dist/models/DeployModelWithStrategyBody.js +2 -0
- package/dist/models/ListModelDeploymentsResponse.d.ts +52 -0
- package/dist/models/ListModelDeploymentsResponse.js +49 -0
- package/dist/models/ParallelismStrategy.d.ts +5 -4
- package/dist/models/ParallelismStrategy.js +5 -4
- package/dist/models/Parameter.d.ts +3 -3
- package/dist/models/Parameter.js +2 -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 +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/DeploymentsApi.ts +29 -0
- package/src/models/Choice.ts +72 -0
- package/src/models/DeployModelWithStrategyBody.ts +12 -0
- package/src/models/ListModelDeploymentsResponse.ts +95 -0
- package/src/models/ParallelismStrategy.ts +5 -4
- package/src/models/Parameter.ts +8 -4
- package/src/models/Strategy.ts +16 -8
- package/src/models/StrategyConfig.ts +99 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -8,11 +8,13 @@ src/apis/StrategiesApi.ts
|
|
|
8
8
|
src/apis/index.ts
|
|
9
9
|
src/index.ts
|
|
10
10
|
src/models/BadRequestResponse.ts
|
|
11
|
+
src/models/Choice.ts
|
|
11
12
|
src/models/DeployModelWithStrategyBody.ts
|
|
12
13
|
src/models/DeploymentModality.ts
|
|
13
14
|
src/models/DesiredState.ts
|
|
14
15
|
src/models/GpuResource.ts
|
|
15
16
|
src/models/ListDeploymentStrategiesResponse.ts
|
|
17
|
+
src/models/ListModelDeploymentsResponse.ts
|
|
16
18
|
src/models/ModelDeployment.ts
|
|
17
19
|
src/models/ModelDeploymentInterface.ts
|
|
18
20
|
src/models/ModelDeploymentInterfaceOneOf.ts
|
|
@@ -30,6 +32,7 @@ src/models/Scope.ts
|
|
|
30
32
|
src/models/ServerErrorResponse.ts
|
|
31
33
|
src/models/State.ts
|
|
32
34
|
src/models/Strategy.ts
|
|
35
|
+
src/models/StrategyConfig.ts
|
|
33
36
|
src/models/Visibility.ts
|
|
34
37
|
src/models/index.ts
|
|
35
38
|
src/runtime.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @mlhub/deployments-ts-sdk@0.
|
|
1
|
+
## @mlhub/deployments-ts-sdk@0.13.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.13.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { DeployModelWithStrategyBody, ModelDeploymentResponse, Platform } from '../models';
|
|
13
|
+
import { DeployModelWithStrategyBody, ListModelDeploymentsResponse, ModelDeploymentResponse, Platform } from '../models';
|
|
14
14
|
export interface DeployModelWithStrategyRequest {
|
|
15
15
|
platform: Platform;
|
|
16
16
|
strategyName: string;
|
|
@@ -37,6 +37,14 @@ export declare class DeploymentsApi extends runtime.BaseAPI {
|
|
|
37
37
|
* Deploy a model to a target platform
|
|
38
38
|
*/
|
|
39
39
|
deployModelWithStrategy(requestParameters: DeployModelWithStrategyRequest, initOverrides?: RequestInit): Promise<ModelDeploymentResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Lists all available deployments
|
|
42
|
+
*/
|
|
43
|
+
listModelDeploymentsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListModelDeploymentsResponse>>;
|
|
44
|
+
/**
|
|
45
|
+
* Lists all available deployments
|
|
46
|
+
*/
|
|
47
|
+
listModelDeployments(initOverrides?: RequestInit): Promise<ListModelDeploymentsResponse>;
|
|
40
48
|
/**
|
|
41
49
|
* Deploy a model to a target platform
|
|
42
50
|
*/
|
|
@@ -127,6 +127,47 @@ var DeploymentsApi = /** @class */ (function (_super) {
|
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
|
+
/**
|
|
131
|
+
* Lists all available deployments
|
|
132
|
+
*/
|
|
133
|
+
DeploymentsApi.prototype.listModelDeploymentsRaw = function (initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var queryParameters, headerParameters, response;
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
switch (_a.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
queryParameters = {};
|
|
140
|
+
headerParameters = {};
|
|
141
|
+
return [4 /*yield*/, this.request({
|
|
142
|
+
path: "/deployments-api/deployments",
|
|
143
|
+
method: 'GET',
|
|
144
|
+
headers: headerParameters,
|
|
145
|
+
query: queryParameters,
|
|
146
|
+
}, initOverrides)];
|
|
147
|
+
case 1:
|
|
148
|
+
response = _a.sent();
|
|
149
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ListModelDeploymentsResponseFromJSON)(jsonValue); })];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Lists all available deployments
|
|
156
|
+
*/
|
|
157
|
+
DeploymentsApi.prototype.listModelDeployments = function (initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
+
var response;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0: return [4 /*yield*/, this.listModelDeploymentsRaw(initOverrides)];
|
|
163
|
+
case 1:
|
|
164
|
+
response = _a.sent();
|
|
165
|
+
return [4 /*yield*/, response.value()];
|
|
166
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
130
171
|
/**
|
|
131
172
|
* Deploy a model to a target platform
|
|
132
173
|
*/
|
|
@@ -0,0 +1,39 @@
|
|
|
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 Choice
|
|
16
|
+
*/
|
|
17
|
+
export interface Choice {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Choice
|
|
22
|
+
*/
|
|
23
|
+
description?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof Choice
|
|
28
|
+
*/
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Choice
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function ChoiceFromJSON(json: any): Choice;
|
|
38
|
+
export declare function ChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Choice;
|
|
39
|
+
export declare function ChoiceToJSON(value?: Choice | null): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
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.ChoiceFromJSON = ChoiceFromJSON;
|
|
17
|
+
exports.ChoiceFromJSONTyped = ChoiceFromJSONTyped;
|
|
18
|
+
exports.ChoiceToJSON = ChoiceToJSON;
|
|
19
|
+
var runtime_1 = require("../runtime");
|
|
20
|
+
function ChoiceFromJSON(json) {
|
|
21
|
+
return ChoiceFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
function ChoiceFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if ((json === undefined) || (json === null)) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
29
|
+
'enabled': json['enabled'],
|
|
30
|
+
'value': json['value'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function ChoiceToJSON(value) {
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (value === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'description': value.description,
|
|
42
|
+
'enabled': value.enabled,
|
|
43
|
+
'value': value.value,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -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, 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}
|
|
@@ -26,6 +26,7 @@ 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'],
|
|
@@ -42,6 +43,7 @@ function DeployModelWithStrategyBodyToJSON(value) {
|
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
return {
|
|
46
|
+
'deployment_modality': (0, _1.DeploymentModalityToJSON)(value.deployment_modality),
|
|
45
47
|
'description': value.description,
|
|
46
48
|
'model_author': value.model_author,
|
|
47
49
|
'model_name': value.model_name,
|
|
@@ -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 { ModelDeployment } from './';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ListModelDeploymentsResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface ListModelDeploymentsResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ListModelDeploymentsResponse
|
|
23
|
+
*/
|
|
24
|
+
message: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {object}
|
|
28
|
+
* @memberof ListModelDeploymentsResponse
|
|
29
|
+
*/
|
|
30
|
+
metadata: object;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<ModelDeployment>}
|
|
34
|
+
* @memberof ListModelDeploymentsResponse
|
|
35
|
+
*/
|
|
36
|
+
result: Array<ModelDeployment>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ListModelDeploymentsResponse
|
|
41
|
+
*/
|
|
42
|
+
status: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ListModelDeploymentsResponse
|
|
47
|
+
*/
|
|
48
|
+
version: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function ListModelDeploymentsResponseFromJSON(json: any): ListModelDeploymentsResponse;
|
|
51
|
+
export declare function ListModelDeploymentsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListModelDeploymentsResponse;
|
|
52
|
+
export declare function ListModelDeploymentsResponseToJSON(value?: ListModelDeploymentsResponse | null): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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.ListModelDeploymentsResponseFromJSON = ListModelDeploymentsResponseFromJSON;
|
|
17
|
+
exports.ListModelDeploymentsResponseFromJSONTyped = ListModelDeploymentsResponseFromJSONTyped;
|
|
18
|
+
exports.ListModelDeploymentsResponseToJSON = ListModelDeploymentsResponseToJSON;
|
|
19
|
+
var _1 = require("./");
|
|
20
|
+
function ListModelDeploymentsResponseFromJSON(json) {
|
|
21
|
+
return ListModelDeploymentsResponseFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
function ListModelDeploymentsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if ((json === undefined) || (json === null)) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'message': json['message'],
|
|
29
|
+
'metadata': json['metadata'],
|
|
30
|
+
'result': (json['result'].map(_1.ModelDeploymentFromJSON)),
|
|
31
|
+
'status': json['status'],
|
|
32
|
+
'version': json['version'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function ListModelDeploymentsResponseToJSON(value) {
|
|
36
|
+
if (value === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (value === null) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'message': value.message,
|
|
44
|
+
'metadata': value.metadata,
|
|
45
|
+
'result': (value.result.map(_1.ModelDeploymentToJSON)),
|
|
46
|
+
'status': value.status,
|
|
47
|
+
'version': value.version,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
* @enum {string}
|
|
16
16
|
*/
|
|
17
17
|
export declare enum ParallelismStrategy {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
PipelineParallelism = "PipelineParallelism",
|
|
19
|
+
TensorParallelism = "TensorParallelism",
|
|
20
|
+
SequenceParallelism = "SequenceParallelism",
|
|
21
|
+
ContextParallelism = "ContextParallelism",
|
|
22
|
+
ExpertParallelism = "ExpertParallelism"
|
|
22
23
|
}
|
|
23
24
|
export declare function ParallelismStrategyFromJSON(json: any): ParallelismStrategy;
|
|
24
25
|
export declare function ParallelismStrategyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ParallelismStrategy;
|
|
@@ -24,10 +24,11 @@ exports.ParallelismStrategyToJSON = ParallelismStrategyToJSON;
|
|
|
24
24
|
*/
|
|
25
25
|
var ParallelismStrategy;
|
|
26
26
|
(function (ParallelismStrategy) {
|
|
27
|
-
ParallelismStrategy["
|
|
28
|
-
ParallelismStrategy["
|
|
29
|
-
ParallelismStrategy["
|
|
30
|
-
ParallelismStrategy["
|
|
27
|
+
ParallelismStrategy["PipelineParallelism"] = "PipelineParallelism";
|
|
28
|
+
ParallelismStrategy["TensorParallelism"] = "TensorParallelism";
|
|
29
|
+
ParallelismStrategy["SequenceParallelism"] = "SequenceParallelism";
|
|
30
|
+
ParallelismStrategy["ContextParallelism"] = "ContextParallelism";
|
|
31
|
+
ParallelismStrategy["ExpertParallelism"] = "ExpertParallelism";
|
|
31
32
|
})(ParallelismStrategy || (exports.ParallelismStrategy = ParallelismStrategy = {}));
|
|
32
33
|
function ParallelismStrategyFromJSON(json) {
|
|
33
34
|
return ParallelismStrategyFromJSONTyped(json, false);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { ParameterType } from './';
|
|
12
|
+
import { Choice, ParameterType } from './';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -18,10 +18,10 @@ import { ParameterType } from './';
|
|
|
18
18
|
export interface Parameter {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<Choice>}
|
|
22
22
|
* @memberof Parameter
|
|
23
23
|
*/
|
|
24
|
-
choices?: Array<
|
|
24
|
+
choices?: Array<Choice> | null;
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
* @type {string}
|
package/dist/models/Parameter.js
CHANGED
|
@@ -26,7 +26,7 @@ function ParameterFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
return json;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
'choices': !(0, runtime_1.exists)(json, 'choices') ? undefined : json['choices'],
|
|
29
|
+
'choices': !(0, runtime_1.exists)(json, 'choices') ? undefined : (json['choices'] === null ? null : json['choices'].map(_1.ChoiceFromJSON)),
|
|
30
30
|
'_default': !(0, runtime_1.exists)(json, 'default') ? undefined : json['default'],
|
|
31
31
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
32
32
|
'name': json['name'],
|
|
@@ -43,7 +43,7 @@ function ParameterToJSON(value) {
|
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
|
-
'choices': value.choices,
|
|
46
|
+
'choices': value.choices === undefined ? undefined : (value.choices === null ? null : value.choices.map(_1.ChoiceToJSON)),
|
|
47
47
|
'default': value._default,
|
|
48
48
|
'description': value.description,
|
|
49
49
|
'name': value.name,
|
|
@@ -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
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './BadRequestResponse';
|
|
2
|
+
export * from './Choice';
|
|
2
3
|
export * from './DeployModelWithStrategyBody';
|
|
3
4
|
export * from './DeploymentModality';
|
|
4
5
|
export * from './DesiredState';
|
|
5
6
|
export * from './GpuResource';
|
|
6
7
|
export * from './ListDeploymentStrategiesResponse';
|
|
8
|
+
export * from './ListModelDeploymentsResponse';
|
|
7
9
|
export * from './ModelDeployment';
|
|
8
10
|
export * from './ModelDeploymentInterface';
|
|
9
11
|
export * from './ModelDeploymentInterfaceOneOf';
|
|
@@ -21,4 +23,5 @@ export * from './Scope';
|
|
|
21
23
|
export * from './ServerErrorResponse';
|
|
22
24
|
export * from './State';
|
|
23
25
|
export * from './Strategy';
|
|
26
|
+
export * from './StrategyConfig';
|
|
24
27
|
export * from './Visibility';
|
package/dist/models/index.js
CHANGED
|
@@ -17,11 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./BadRequestResponse"), exports);
|
|
20
|
+
__exportStar(require("./Choice"), exports);
|
|
20
21
|
__exportStar(require("./DeployModelWithStrategyBody"), exports);
|
|
21
22
|
__exportStar(require("./DeploymentModality"), exports);
|
|
22
23
|
__exportStar(require("./DesiredState"), exports);
|
|
23
24
|
__exportStar(require("./GpuResource"), exports);
|
|
24
25
|
__exportStar(require("./ListDeploymentStrategiesResponse"), exports);
|
|
26
|
+
__exportStar(require("./ListModelDeploymentsResponse"), exports);
|
|
25
27
|
__exportStar(require("./ModelDeployment"), exports);
|
|
26
28
|
__exportStar(require("./ModelDeploymentInterface"), exports);
|
|
27
29
|
__exportStar(require("./ModelDeploymentInterfaceOneOf"), exports);
|
|
@@ -39,4 +41,5 @@ __exportStar(require("./Scope"), exports);
|
|
|
39
41
|
__exportStar(require("./ServerErrorResponse"), exports);
|
|
40
42
|
__exportStar(require("./State"), exports);
|
|
41
43
|
__exportStar(require("./Strategy"), exports);
|
|
44
|
+
__exportStar(require("./StrategyConfig"), exports);
|
|
42
45
|
__exportStar(require("./Visibility"), exports);
|
package/package.json
CHANGED
|
@@ -21,6 +21,9 @@ import {
|
|
|
21
21
|
DeployModelWithStrategyBody,
|
|
22
22
|
DeployModelWithStrategyBodyFromJSON,
|
|
23
23
|
DeployModelWithStrategyBodyToJSON,
|
|
24
|
+
ListModelDeploymentsResponse,
|
|
25
|
+
ListModelDeploymentsResponseFromJSON,
|
|
26
|
+
ListModelDeploymentsResponseToJSON,
|
|
24
27
|
ModelDeploymentResponse,
|
|
25
28
|
ModelDeploymentResponseFromJSON,
|
|
26
29
|
ModelDeploymentResponseToJSON,
|
|
@@ -99,6 +102,32 @@ export class DeploymentsApi extends runtime.BaseAPI {
|
|
|
99
102
|
return await response.value();
|
|
100
103
|
}
|
|
101
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Lists all available deployments
|
|
107
|
+
*/
|
|
108
|
+
async listModelDeploymentsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListModelDeploymentsResponse>> {
|
|
109
|
+
const queryParameters: any = {};
|
|
110
|
+
|
|
111
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
112
|
+
|
|
113
|
+
const response = await this.request({
|
|
114
|
+
path: `/deployments-api/deployments`,
|
|
115
|
+
method: 'GET',
|
|
116
|
+
headers: headerParameters,
|
|
117
|
+
query: queryParameters,
|
|
118
|
+
}, initOverrides);
|
|
119
|
+
|
|
120
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListModelDeploymentsResponseFromJSON(jsonValue));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Lists all available deployments
|
|
125
|
+
*/
|
|
126
|
+
async listModelDeployments(initOverrides?: RequestInit): Promise<ListModelDeploymentsResponse> {
|
|
127
|
+
const response = await this.listModelDeploymentsRaw(initOverrides);
|
|
128
|
+
return await response.value();
|
|
129
|
+
}
|
|
130
|
+
|
|
102
131
|
/**
|
|
103
132
|
* Deploy a model to a target platform
|
|
104
133
|
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
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 Choice
|
|
20
|
+
*/
|
|
21
|
+
export interface Choice {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Choice
|
|
26
|
+
*/
|
|
27
|
+
description?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof Choice
|
|
32
|
+
*/
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Choice
|
|
38
|
+
*/
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ChoiceFromJSON(json: any): Choice {
|
|
43
|
+
return ChoiceFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Choice {
|
|
47
|
+
if ((json === undefined) || (json === null)) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
|
|
52
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
53
|
+
'enabled': json['enabled'],
|
|
54
|
+
'value': json['value'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ChoiceToJSON(value?: Choice | null): any {
|
|
59
|
+
if (value === undefined) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
if (value === null) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'description': value.description,
|
|
68
|
+
'enabled': value.enabled,
|
|
69
|
+
'value': value.value,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
+
DeploymentModality,
|
|
18
|
+
DeploymentModalityFromJSON,
|
|
19
|
+
DeploymentModalityFromJSONTyped,
|
|
20
|
+
DeploymentModalityToJSON,
|
|
17
21
|
Scope,
|
|
18
22
|
ScopeFromJSON,
|
|
19
23
|
ScopeFromJSONTyped,
|
|
@@ -26,6 +30,12 @@ import {
|
|
|
26
30
|
* @interface DeployModelWithStrategyBody
|
|
27
31
|
*/
|
|
28
32
|
export interface DeployModelWithStrategyBody {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {DeploymentModality}
|
|
36
|
+
* @memberof DeployModelWithStrategyBody
|
|
37
|
+
*/
|
|
38
|
+
deployment_modality: DeploymentModality;
|
|
29
39
|
/**
|
|
30
40
|
*
|
|
31
41
|
* @type {string}
|
|
@@ -74,6 +84,7 @@ export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscri
|
|
|
74
84
|
}
|
|
75
85
|
return {
|
|
76
86
|
|
|
87
|
+
'deployment_modality': DeploymentModalityFromJSON(json['deployment_modality']),
|
|
77
88
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
78
89
|
'model_author': json['model_author'],
|
|
79
90
|
'model_name': json['model_name'],
|
|
@@ -92,6 +103,7 @@ export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrateg
|
|
|
92
103
|
}
|
|
93
104
|
return {
|
|
94
105
|
|
|
106
|
+
'deployment_modality': DeploymentModalityToJSON(value.deployment_modality),
|
|
95
107
|
'description': value.description,
|
|
96
108
|
'model_author': value.model_author,
|
|
97
109
|
'model_name': value.model_name,
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
ModelDeployment,
|
|
18
|
+
ModelDeploymentFromJSON,
|
|
19
|
+
ModelDeploymentFromJSONTyped,
|
|
20
|
+
ModelDeploymentToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ListModelDeploymentsResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface ListModelDeploymentsResponse {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ListModelDeploymentsResponse
|
|
33
|
+
*/
|
|
34
|
+
message: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {object}
|
|
38
|
+
* @memberof ListModelDeploymentsResponse
|
|
39
|
+
*/
|
|
40
|
+
metadata: object;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<ModelDeployment>}
|
|
44
|
+
* @memberof ListModelDeploymentsResponse
|
|
45
|
+
*/
|
|
46
|
+
result: Array<ModelDeployment>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof ListModelDeploymentsResponse
|
|
51
|
+
*/
|
|
52
|
+
status: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof ListModelDeploymentsResponse
|
|
57
|
+
*/
|
|
58
|
+
version: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function ListModelDeploymentsResponseFromJSON(json: any): ListModelDeploymentsResponse {
|
|
62
|
+
return ListModelDeploymentsResponseFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ListModelDeploymentsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListModelDeploymentsResponse {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'message': json['message'],
|
|
72
|
+
'metadata': json['metadata'],
|
|
73
|
+
'result': ((json['result'] as Array<any>).map(ModelDeploymentFromJSON)),
|
|
74
|
+
'status': json['status'],
|
|
75
|
+
'version': json['version'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ListModelDeploymentsResponseToJSON(value?: ListModelDeploymentsResponse | null): any {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'message': value.message,
|
|
89
|
+
'metadata': value.metadata,
|
|
90
|
+
'result': ((value.result as Array<any>).map(ModelDeploymentToJSON)),
|
|
91
|
+
'status': value.status,
|
|
92
|
+
'version': value.version,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
* @enum {string}
|
|
19
19
|
*/
|
|
20
20
|
export enum ParallelismStrategy {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
PipelineParallelism = 'PipelineParallelism',
|
|
22
|
+
TensorParallelism = 'TensorParallelism',
|
|
23
|
+
SequenceParallelism = 'SequenceParallelism',
|
|
24
|
+
ContextParallelism = 'ContextParallelism',
|
|
25
|
+
ExpertParallelism = 'ExpertParallelism'
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export function ParallelismStrategyFromJSON(json: any): ParallelismStrategy {
|
package/src/models/Parameter.ts
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
16
|
import {
|
|
17
|
+
Choice,
|
|
18
|
+
ChoiceFromJSON,
|
|
19
|
+
ChoiceFromJSONTyped,
|
|
20
|
+
ChoiceToJSON,
|
|
17
21
|
ParameterType,
|
|
18
22
|
ParameterTypeFromJSON,
|
|
19
23
|
ParameterTypeFromJSONTyped,
|
|
@@ -28,10 +32,10 @@ import {
|
|
|
28
32
|
export interface Parameter {
|
|
29
33
|
/**
|
|
30
34
|
*
|
|
31
|
-
* @type {Array<
|
|
35
|
+
* @type {Array<Choice>}
|
|
32
36
|
* @memberof Parameter
|
|
33
37
|
*/
|
|
34
|
-
choices?: Array<
|
|
38
|
+
choices?: Array<Choice> | null;
|
|
35
39
|
/**
|
|
36
40
|
*
|
|
37
41
|
* @type {string}
|
|
@@ -80,7 +84,7 @@ export function ParameterFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
80
84
|
}
|
|
81
85
|
return {
|
|
82
86
|
|
|
83
|
-
'choices': !exists(json, 'choices') ? undefined : json['choices'],
|
|
87
|
+
'choices': !exists(json, 'choices') ? undefined : (json['choices'] === null ? null : (json['choices'] as Array<any>).map(ChoiceFromJSON)),
|
|
84
88
|
'_default': !exists(json, 'default') ? undefined : json['default'],
|
|
85
89
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
86
90
|
'name': json['name'],
|
|
@@ -99,7 +103,7 @@ export function ParameterToJSON(value?: Parameter | null): any {
|
|
|
99
103
|
}
|
|
100
104
|
return {
|
|
101
105
|
|
|
102
|
-
'choices': value.choices,
|
|
106
|
+
'choices': value.choices === undefined ? undefined : (value.choices === null ? null : (value.choices as Array<any>).map(ChoiceToJSON)),
|
|
103
107
|
'default': value._default,
|
|
104
108
|
'description': value.description,
|
|
105
109
|
'name': value.name,
|
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
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './BadRequestResponse';
|
|
4
|
+
export * from './Choice';
|
|
4
5
|
export * from './DeployModelWithStrategyBody';
|
|
5
6
|
export * from './DeploymentModality';
|
|
6
7
|
export * from './DesiredState';
|
|
7
8
|
export * from './GpuResource';
|
|
8
9
|
export * from './ListDeploymentStrategiesResponse';
|
|
10
|
+
export * from './ListModelDeploymentsResponse';
|
|
9
11
|
export * from './ModelDeployment';
|
|
10
12
|
export * from './ModelDeploymentInterface';
|
|
11
13
|
export * from './ModelDeploymentInterfaceOneOf';
|
|
@@ -23,4 +25,5 @@ export * from './Scope';
|
|
|
23
25
|
export * from './ServerErrorResponse';
|
|
24
26
|
export * from './State';
|
|
25
27
|
export * from './Strategy';
|
|
28
|
+
export * from './StrategyConfig';
|
|
26
29
|
export * from './Visibility';
|