@daocloud-proto/hydra 0.0.0-dev-5c60a30e → 0.0.0-dev-c571dd90

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.
@@ -0,0 +1,60 @@
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 HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum RefreshCycle {
12
+ REFRESH_CYCLE_UNSPECIFIED = "REFRESH_CYCLE_UNSPECIFIED",
13
+ REFRESH_CYCLE_DAY = "REFRESH_CYCLE_DAY",
14
+ REFRESH_CYCLE_WEEK = "REFRESH_CYCLE_WEEK",
15
+ REFRESH_CYCLE_MONTH = "REFRESH_CYCLE_MONTH",
16
+ }
17
+
18
+ export type WorkspaceQuota = {
19
+ workspace?: number
20
+ quota?: string
21
+ nextRefreshTime?: GoogleProtobufTimestamp.Timestamp
22
+ refreshCycle?: RefreshCycle
23
+ usedQuota?: string
24
+ allocatedQuota?: string
25
+ updateTime?: GoogleProtobufTimestamp.Timestamp
26
+ unlimitedQuota?: boolean
27
+ }
28
+
29
+ export type ListWorkspaceQuotasRequest = {
30
+ page?: HydraCommonCommon.Pagination
31
+ workspace?: number
32
+ }
33
+
34
+ export type ListWorkspaceQuotasResponse = {
35
+ items?: WorkspaceQuota[]
36
+ page?: HydraCommonCommon.Pagination
37
+ }
38
+
39
+ export type UpdateWorkspaceQuotaRequest = {
40
+ workspace?: number
41
+ quota?: string
42
+ unlimitedQuota?: boolean
43
+ }
44
+
45
+ export type UpdateWorkspaceQuotaRefreshCycleRequest = {
46
+ workspace?: number
47
+ refreshCycle?: RefreshCycle
48
+ }
49
+
50
+ export class WorkspaceQuotaService {
51
+ static ListWorkspaceQuotas(req: ListWorkspaceQuotasRequest, initReq?: fm.InitReq): Promise<ListWorkspaceQuotasResponse> {
52
+ return fm.fetchReq<ListWorkspaceQuotasRequest, ListWorkspaceQuotasResponse>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
53
+ }
54
+ static UpdateWorkspaceQuota(req: UpdateWorkspaceQuotaRequest, initReq?: fm.InitReq): Promise<WorkspaceQuota> {
55
+ return fm.fetchReq<UpdateWorkspaceQuotaRequest, WorkspaceQuota>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas/${req["workspace"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
56
+ }
57
+ static UpdateWorkspaceQuotaRefreshCycle(req: UpdateWorkspaceQuotaRefreshCycleRequest, initReq?: fm.InitReq): Promise<WorkspaceQuota> {
58
+ return fm.fetchReq<UpdateWorkspaceQuotaRefreshCycleRequest, WorkspaceQuota>(`/apis/admin.hydra.io/v1alpha1/workspace-quotas/${req["workspace"]}/refresh-cycle`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
59
+ }
60
+ }
@@ -17,13 +17,6 @@ type OneOf<T> =
17
17
  : never)
18
18
  : never);
19
19
 
20
- export enum APIKeyStatus {
21
- API_KEY_STATUS_UNSPECIFIED = "API_KEY_STATUS_UNSPECIFIED",
22
- API_KEY_STATUS_ACTIVE = "API_KEY_STATUS_ACTIVE",
23
- API_KEY_STATUS_DISABLED = "API_KEY_STATUS_DISABLED",
24
- API_KEY_STATUS_EXPIRED = "API_KEY_STATUS_EXPIRED",
25
- }
26
-
27
20
  export enum TimePeriod {
28
21
  TIME_PERIOD_UNSPECIFIED = "TIME_PERIOD_UNSPECIFIED",
29
22
  TIME_PERIOD_HOUR = "TIME_PERIOD_HOUR",
@@ -65,9 +58,11 @@ export type APIKey = {
65
58
  expireTime?: GoogleProtobufTimestamp.Timestamp
66
59
  remainingQuota?: string
67
60
  remainingQuotaSyncedAt?: GoogleProtobufTimestamp.Timestamp
68
- status?: APIKeyStatus
69
61
  unlimitedQuota?: boolean
70
62
  usedQuota?: string
63
+ lastUsedTime?: GoogleProtobufTimestamp.Timestamp
64
+ expired?: boolean
65
+ disabled?: boolean
71
66
  }
72
67
 
73
68
  export type ListWSAPIKeyRequest = {
@@ -30,6 +30,44 @@ export enum FineTuningType {
30
30
  FREEZE = "FREEZE",
31
31
  }
32
32
 
33
+ export enum ComputeType {
34
+ COMPUTE_TYPE_UNSPECIFIED = "COMPUTE_TYPE_UNSPECIFIED",
35
+ BF16 = "BF16",
36
+ FP16 = "FP16",
37
+ FP32 = "FP32",
38
+ PURE_BF16 = "PURE_BF16",
39
+ }
40
+
41
+ export enum LrSchedulerType {
42
+ LR_SCHEDULER_TYPE_UNSPECIFIED = "LR_SCHEDULER_TYPE_UNSPECIFIED",
43
+ COSINE = "COSINE",
44
+ LINEAR = "LINEAR",
45
+ COSINE_WITH_RESTARTS = "COSINE_WITH_RESTARTS",
46
+ POLYNOMIAL = "POLYNOMIAL",
47
+ CONSTANT = "CONSTANT",
48
+ CONSTANT_WITH_WARMUP = "CONSTANT_WITH_WARMUP",
49
+ INVERSE_SQRT = "INVERSE_SQRT",
50
+ REDUCE_LR_ON_PLATEAU = "REDUCE_LR_ON_PLATEAU",
51
+ COSINE_WITH_MIN_LR = "COSINE_WITH_MIN_LR",
52
+ WARMUP_STABLE_DECAY = "WARMUP_STABLE_DECAY",
53
+ }
54
+
55
+ export enum OptimizerType {
56
+ OPTIMIZER_TYPE_UNSPECIFIED = "OPTIMIZER_TYPE_UNSPECIFIED",
57
+ ADAMW_TORCH = "ADAMW_TORCH",
58
+ ADAMW_HF = "ADAMW_HF",
59
+ SGD = "SGD",
60
+ ADAFACTOR = "ADAFACTOR",
61
+ ADAGRAD = "ADAGRAD",
62
+ }
63
+
64
+ export enum QuantizationMethodType {
65
+ QUANTIZATION_METHOD_TYPE_UNSPECIFIED = "QUANTIZATION_METHOD_TYPE_UNSPECIFIED",
66
+ BITSANDBYTES = "BITSANDBYTES",
67
+ HQQ = "HQQ",
68
+ EETQ = "EETQ",
69
+ }
70
+
33
71
  export type ModelConfig = {
34
72
  modelId?: string
35
73
  modelVolumeId?: string
@@ -52,7 +90,7 @@ export type LoraConfig = {
52
90
  pissaConvert?: boolean
53
91
  createNewAdapter?: boolean
54
92
  quantizationBit?: number
55
- quantizationMethod?: string
93
+ quantizationMethod?: QuantizationMethodType
56
94
  ropeScaling?: string
57
95
  booster?: string
58
96
  }
@@ -70,11 +108,11 @@ export type TrainingConfig = {
70
108
  perDeviceTrainBatchSize?: number
71
109
  gradientAccumulationSteps?: number
72
110
  learningRate?: string
73
- lrSchedulerType?: string
111
+ lrSchedulerType?: LrSchedulerType
74
112
  warmupRatio?: string
75
113
  warmupSteps?: number
76
- bf16?: boolean
77
- optimizer?: string
114
+ computeType?: ComputeType
115
+ optimizer?: OptimizerType
78
116
  seed?: number
79
117
  ddpTimeout?: number
80
118
  maxGradNorm?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.0.0-dev-5c60a30e",
3
+ "version": "v0.0.0-dev-c571dd90",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"