@daocloud-proto/baize 0.109.0 → 0.110.1
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.
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
import * as BaizeManagement_apiWorkspaceV1alpha1Workspace from "../../workspace/v1alpha1/workspace.pb"
|
|
10
11
|
|
|
11
12
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
13
|
type OneOf<T> =
|
|
@@ -24,6 +25,8 @@ export enum DataSourceType {
|
|
|
24
25
|
HTTP = "HTTP",
|
|
25
26
|
PVC = "PVC",
|
|
26
27
|
NFS = "NFS",
|
|
28
|
+
REFERENCE = "REFERENCE",
|
|
29
|
+
HUGGING_FACE = "HUGGING_FACE",
|
|
27
30
|
CONDA = "CONDA",
|
|
28
31
|
}
|
|
29
32
|
|
|
@@ -41,6 +44,18 @@ export enum DataSourceOptionsCondaPackageManager {
|
|
|
41
44
|
CONDA = "CONDA",
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
export enum DataSourceOptionsHuggingFaceRepoType {
|
|
48
|
+
REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
|
|
49
|
+
MODEL = "MODEL",
|
|
50
|
+
DATASET = "DATASET",
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export enum DataSourceOptionsS3Provider {
|
|
54
|
+
PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
|
|
55
|
+
AWS = "AWS",
|
|
56
|
+
MINIO = "MINIO",
|
|
57
|
+
}
|
|
58
|
+
|
|
44
59
|
export enum SecretOptionsAuthType {
|
|
45
60
|
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
46
61
|
BASIC = "BASIC",
|
|
@@ -83,6 +98,8 @@ export type Dataset = {
|
|
|
83
98
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
84
99
|
labels?: {[key: string]: string}
|
|
85
100
|
annotations?: {[key: string]: string}
|
|
101
|
+
share?: boolean
|
|
102
|
+
sharedStoWorkspaces?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace[]
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
export type DataSourceOptionsConda = {
|
|
@@ -95,6 +112,13 @@ export type DataSourceOptionsConda = {
|
|
|
95
112
|
gpuType?: string
|
|
96
113
|
}
|
|
97
114
|
|
|
115
|
+
export type DataSourceOptionsHuggingFace = {
|
|
116
|
+
repoType?: string
|
|
117
|
+
endpoint?: string
|
|
118
|
+
include?: string
|
|
119
|
+
exclude?: string
|
|
120
|
+
}
|
|
121
|
+
|
|
98
122
|
export type DataSourceOptionsGit = {
|
|
99
123
|
branch?: string
|
|
100
124
|
commit?: string
|
|
@@ -105,6 +129,7 @@ export type DataSourceOptionsGit = {
|
|
|
105
129
|
export type DataSourceOptionsS3 = {
|
|
106
130
|
region?: string
|
|
107
131
|
endpoint?: string
|
|
132
|
+
provider?: DataSourceOptionsS3Provider
|
|
108
133
|
}
|
|
109
134
|
|
|
110
135
|
export type DataSourceOptionsHttp = {
|
|
@@ -116,7 +141,7 @@ export type DataSourceOptionsHttp = {
|
|
|
116
141
|
}
|
|
117
142
|
|
|
118
143
|
export type DataSourceOptions = BaseDataSourceOptions
|
|
119
|
-
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda }>
|
|
144
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace }>
|
|
120
145
|
|
|
121
146
|
export type SecretOptionsBasicAuth = {
|
|
122
147
|
username?: string
|
|
@@ -192,6 +217,8 @@ export type SingleDatasetRequest = {
|
|
|
192
217
|
namespace?: string
|
|
193
218
|
name?: string
|
|
194
219
|
secretOptions?: SecretOptions
|
|
220
|
+
share?: boolean
|
|
221
|
+
sharedStoWorkspaces?: number[]
|
|
195
222
|
}
|
|
196
223
|
|
|
197
224
|
export type UpdateDatasetRequest = BaseUpdateDatasetRequest
|
|
@@ -0,0 +1,85 @@
|
|
|
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 BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
|
+
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
|
|
12
|
+
export enum LabelingInstanceType {
|
|
13
|
+
LABELING_INSTANCE_TYPE_UNSPECIFIED = "LABELING_INSTANCE_TYPE_UNSPECIFIED",
|
|
14
|
+
LABEL_STUDIO = "LABEL_STUDIO",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum Phase {
|
|
18
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
19
|
+
PENDING = "PENDING",
|
|
20
|
+
READY = "READY",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type AccessURLs = {
|
|
24
|
+
home?: string
|
|
25
|
+
exportData?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type LabelingInstance = {
|
|
29
|
+
cluster?: string
|
|
30
|
+
namespace?: string
|
|
31
|
+
name?: string
|
|
32
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
33
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
34
|
+
type?: LabelingInstanceType
|
|
35
|
+
description?: string
|
|
36
|
+
labelingConfig?: string
|
|
37
|
+
phase?: Phase
|
|
38
|
+
accessUrls?: AccessURLs
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type CreateLabelingInstanceRequest = {
|
|
42
|
+
cluster?: string
|
|
43
|
+
namespace?: string
|
|
44
|
+
name?: string
|
|
45
|
+
workspace?: number
|
|
46
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
47
|
+
type?: LabelingInstanceType
|
|
48
|
+
description?: string
|
|
49
|
+
uiBaseUrl?: string
|
|
50
|
+
labelingConfig?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type ListLabelingInstanceRequest = {
|
|
54
|
+
workspace?: number
|
|
55
|
+
cluster?: string
|
|
56
|
+
namespace?: string
|
|
57
|
+
page?: BaizeCommonCommon.Pagination
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type ListLabelingInstanceResponse = {
|
|
61
|
+
items?: LabelingInstance[]
|
|
62
|
+
page?: BaizeCommonCommon.Pagination
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type SingleLabelingInstanceRequest = {
|
|
66
|
+
workspace?: number
|
|
67
|
+
cluster?: string
|
|
68
|
+
namespace?: string
|
|
69
|
+
name?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class LabelingManagement {
|
|
73
|
+
static CreateLabelingInstance(req: CreateLabelingInstanceRequest, initReq?: fm.InitReq): Promise<LabelingInstance> {
|
|
74
|
+
return fm.fetchReq<CreateLabelingInstanceRequest, LabelingInstance>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/labeling-instances`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
75
|
+
}
|
|
76
|
+
static ListLabelingInstance(req: ListLabelingInstanceRequest, initReq?: fm.InitReq): Promise<ListLabelingInstanceResponse> {
|
|
77
|
+
return fm.fetchReq<ListLabelingInstanceRequest, ListLabelingInstanceResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/labeling-instances?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
78
|
+
}
|
|
79
|
+
static GetLabelingInstance(req: SingleLabelingInstanceRequest, initReq?: fm.InitReq): Promise<LabelingInstance> {
|
|
80
|
+
return fm.fetchReq<SingleLabelingInstanceRequest, LabelingInstance>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/labeling-instances/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
81
|
+
}
|
|
82
|
+
static DeleteLabelingInstance(req: SingleLabelingInstanceRequest, initReq?: fm.InitReq): Promise<LabelingInstance> {
|
|
83
|
+
return fm.fetchReq<SingleLabelingInstanceRequest, LabelingInstance>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/labeling-instances/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -213,6 +213,19 @@ export type NotebookImageListResponse = {
|
|
|
213
213
|
items?: NotebookImage[]
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
export type NotebookConnectionInfoSSH = {
|
|
217
|
+
host?: string
|
|
218
|
+
port?: number
|
|
219
|
+
username?: string
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type NotebookConnectionInfo = {
|
|
223
|
+
cluster?: string
|
|
224
|
+
namespace?: string
|
|
225
|
+
name?: string
|
|
226
|
+
ssh?: NotebookConnectionInfoSSH
|
|
227
|
+
}
|
|
228
|
+
|
|
216
229
|
export class NotebookService {
|
|
217
230
|
static ListNotebooks(req: ListNotebooksRequest, initReq?: fm.InitReq): Promise<ListNotebooksResponse> {
|
|
218
231
|
return fm.fetchReq<ListNotebooksRequest, ListNotebooksResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/notebooks?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -220,6 +233,9 @@ export class NotebookService {
|
|
|
220
233
|
static GetNotebook(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<Notebook> {
|
|
221
234
|
return fm.fetchReq<SingleNotebookRequest, Notebook>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
222
235
|
}
|
|
236
|
+
static GetNotebookConnectionInfo(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<NotebookConnectionInfo> {
|
|
237
|
+
return fm.fetchReq<SingleNotebookRequest, NotebookConnectionInfo>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/connections?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
238
|
+
}
|
|
223
239
|
static CreateNotebook(req: CreateNotebookRequest, initReq?: fm.InitReq): Promise<Notebook> {
|
|
224
240
|
return fm.fetchReq<CreateNotebookRequest, Notebook>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
225
241
|
}
|