@daocloud-proto/baize 0.110.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,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,8 @@ 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[]
92
103
  }
93
104
 
94
105
  export type DataSourceOptionsConda = {
@@ -101,6 +112,13 @@ export type DataSourceOptionsConda = {
101
112
  gpuType?: string
102
113
  }
103
114
 
115
+ export type DataSourceOptionsHuggingFace = {
116
+ repoType?: string
117
+ endpoint?: string
118
+ include?: string
119
+ exclude?: string
120
+ }
121
+
104
122
  export type DataSourceOptionsGit = {
105
123
  branch?: string
106
124
  commit?: string
@@ -123,7 +141,7 @@ export type DataSourceOptionsHttp = {
123
141
  }
124
142
 
125
143
  export type DataSourceOptions = BaseDataSourceOptions
126
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda }>
144
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace }>
127
145
 
128
146
  export type SecretOptionsBasicAuth = {
129
147
  username?: string
@@ -199,6 +217,8 @@ export type SingleDatasetRequest = {
199
217
  namespace?: string
200
218
  name?: string
201
219
  secretOptions?: SecretOptions
220
+ share?: boolean
221
+ sharedStoWorkspaces?: number[]
202
222
  }
203
223
 
204
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
+ }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.110.0",
3
+ "version": "v0.110.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"