@daocloud-proto/baize 0.109.0 → 0.110.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.
|
@@ -41,6 +41,12 @@ export enum DataSourceOptionsCondaPackageManager {
|
|
|
41
41
|
CONDA = "CONDA",
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export enum DataSourceOptionsS3Provider {
|
|
45
|
+
PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
|
|
46
|
+
AWS = "AWS",
|
|
47
|
+
MINIO = "MINIO",
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
export enum SecretOptionsAuthType {
|
|
45
51
|
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
46
52
|
BASIC = "BASIC",
|
|
@@ -105,6 +111,7 @@ export type DataSourceOptionsGit = {
|
|
|
105
111
|
export type DataSourceOptionsS3 = {
|
|
106
112
|
region?: string
|
|
107
113
|
endpoint?: string
|
|
114
|
+
provider?: DataSourceOptionsS3Provider
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
export type DataSourceOptionsHttp = {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
|
|
11
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
|
+
type OneOf<T> =
|
|
13
|
+
| { [k in keyof T]?: undefined }
|
|
14
|
+
| (
|
|
15
|
+
keyof T extends infer K ?
|
|
16
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
17
|
+
: never)
|
|
18
|
+
: never);
|
|
19
|
+
|
|
20
|
+
export enum Format {
|
|
21
|
+
FORMAT_UNSPECIFIED = "FORMAT_UNSPECIFIED",
|
|
22
|
+
PYTORCH = "PYTORCH",
|
|
23
|
+
TENSORFLOW = "TENSORFLOW",
|
|
24
|
+
ONNX = "ONNX",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum Architecture {
|
|
28
|
+
ARCHITECTURE_UNSPECIFIED = "ARCHITECTURE_UNSPECIFIED",
|
|
29
|
+
CNN = "CNN",
|
|
30
|
+
RNN = "RNN",
|
|
31
|
+
LSTM = "LSTM",
|
|
32
|
+
TRANSFORMER = "TRANSFORMER",
|
|
33
|
+
MLP = "MLP",
|
|
34
|
+
BERT = "BERT",
|
|
35
|
+
GAN = "GAN",
|
|
36
|
+
RESNET = "RESNET",
|
|
37
|
+
OTHER = "OTHER",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum ModelVersionSourceType {
|
|
41
|
+
VERSION_SOURCE_TYPE_UNSPECIFIED = "VERSION_SOURCE_TYPE_UNSPECIFIED",
|
|
42
|
+
DATASET = "DATASET",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum ModelStatusPhase {
|
|
46
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
47
|
+
PENDING = "PENDING",
|
|
48
|
+
CREATING = "CREATING",
|
|
49
|
+
READY = "READY",
|
|
50
|
+
ERROR = "ERROR",
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Workspace = {
|
|
54
|
+
workspaceId?: number
|
|
55
|
+
alias?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type DatasetRef = {
|
|
59
|
+
namespace?: string
|
|
60
|
+
name?: string
|
|
61
|
+
path?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/* baize modified */ export type BaseModelVersionSource = {
|
|
66
|
+
type?: ModelVersionSourceType
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type ModelVersionSource = BaseModelVersionSource
|
|
70
|
+
& OneOf<{ datasetRef: DatasetRef }>
|
|
71
|
+
|
|
72
|
+
export type Version = {
|
|
73
|
+
version?: string
|
|
74
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
75
|
+
source?: ModelVersionSource
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type ModelStatus = {
|
|
79
|
+
phase?: ModelStatusPhase
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type Model = {
|
|
83
|
+
name?: string
|
|
84
|
+
cluster?: string
|
|
85
|
+
namespace?: string
|
|
86
|
+
share?: boolean
|
|
87
|
+
sharedToWorkspaces?: Workspace[]
|
|
88
|
+
format?: Format
|
|
89
|
+
architecture?: Architecture
|
|
90
|
+
versions?: Version[]
|
|
91
|
+
license?: string
|
|
92
|
+
isLLM?: boolean
|
|
93
|
+
latestVersion?: string
|
|
94
|
+
iconUrl?: string
|
|
95
|
+
tags?: string[]
|
|
96
|
+
readme?: string
|
|
97
|
+
status?: ModelStatus
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type ListModelsRequest = {
|
|
101
|
+
workspace?: number
|
|
102
|
+
cluster?: string
|
|
103
|
+
namespace?: string
|
|
104
|
+
page?: BaizeCommonCommon.Pagination
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ListModelsResponse = {
|
|
108
|
+
items?: Model[]
|
|
109
|
+
page?: BaizeCommonCommon.Pagination
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type SingleModelRequest = {
|
|
113
|
+
name?: string
|
|
114
|
+
cluster?: string
|
|
115
|
+
namespace?: string
|
|
116
|
+
workspace?: number
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type CreateModelRequest = {
|
|
120
|
+
workspace?: number
|
|
121
|
+
name?: string
|
|
122
|
+
cluster?: string
|
|
123
|
+
namespace?: string
|
|
124
|
+
format?: Format
|
|
125
|
+
architecture?: Architecture
|
|
126
|
+
versions?: Version[]
|
|
127
|
+
license?: string
|
|
128
|
+
isLLM?: boolean
|
|
129
|
+
latestVersion?: string
|
|
130
|
+
iconUrl?: string
|
|
131
|
+
tags?: string[]
|
|
132
|
+
readme?: string
|
|
133
|
+
share?: boolean
|
|
134
|
+
sharedToWorkspaces?: Workspace[]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export class ModelManagement {
|
|
138
|
+
static ListModels(req: ListModelsRequest, initReq?: fm.InitReq): Promise<ListModelsResponse> {
|
|
139
|
+
return fm.fetchReq<ListModelsRequest, ListModelsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
140
|
+
}
|
|
141
|
+
static ListSharedModels(req: ListModelsRequest, initReq?: fm.InitReq): Promise<ListModelsResponse> {
|
|
142
|
+
return fm.fetchReq<ListModelsRequest, ListModelsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/shared-models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
143
|
+
}
|
|
144
|
+
static GetModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
145
|
+
return fm.fetchReq<SingleModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
146
|
+
}
|
|
147
|
+
static CreateModel(req: CreateModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
148
|
+
return fm.fetchReq<CreateModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
149
|
+
}
|
|
150
|
+
static DeleteModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
151
|
+
return fm.fetchReq<SingleModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
152
|
+
}
|
|
153
|
+
}
|