@daocloud-proto/baize 0.110.0 → 0.110.2
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,12 @@ 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
|
+
|
|
44
53
|
export enum DataSourceOptionsS3Provider {
|
|
45
54
|
PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
|
|
46
55
|
AWS = "AWS",
|
|
@@ -89,6 +98,9 @@ export type Dataset = {
|
|
|
89
98
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
90
99
|
labels?: {[key: string]: string}
|
|
91
100
|
annotations?: {[key: string]: string}
|
|
101
|
+
share?: boolean
|
|
102
|
+
sharedStoWorkspaces?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace[]
|
|
103
|
+
boundPVC?: DatasetBoundPVC
|
|
92
104
|
}
|
|
93
105
|
|
|
94
106
|
export type DataSourceOptionsConda = {
|
|
@@ -101,6 +113,13 @@ export type DataSourceOptionsConda = {
|
|
|
101
113
|
gpuType?: string
|
|
102
114
|
}
|
|
103
115
|
|
|
116
|
+
export type DataSourceOptionsHuggingFace = {
|
|
117
|
+
repoType?: string
|
|
118
|
+
endpoint?: string
|
|
119
|
+
include?: string
|
|
120
|
+
exclude?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
104
123
|
export type DataSourceOptionsGit = {
|
|
105
124
|
branch?: string
|
|
106
125
|
commit?: string
|
|
@@ -123,7 +142,7 @@ export type DataSourceOptionsHttp = {
|
|
|
123
142
|
}
|
|
124
143
|
|
|
125
144
|
export type DataSourceOptions = BaseDataSourceOptions
|
|
126
|
-
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda }>
|
|
145
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace }>
|
|
127
146
|
|
|
128
147
|
export type SecretOptionsBasicAuth = {
|
|
129
148
|
username?: string
|
|
@@ -199,6 +218,8 @@ export type SingleDatasetRequest = {
|
|
|
199
218
|
namespace?: string
|
|
200
219
|
name?: string
|
|
201
220
|
secretOptions?: SecretOptions
|
|
221
|
+
share?: boolean
|
|
222
|
+
sharedStoWorkspaces?: number[]
|
|
202
223
|
}
|
|
203
224
|
|
|
204
225
|
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
|
+
}
|
|
@@ -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
|
}
|