@cozeloop/prompt-components 0.0.1 → 0.0.3

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.
Files changed (150) hide show
  1. package/dist/es/idls/fornax_ml_flow/index.js +2322 -0
  2. package/dist/es/idls/fornax_ml_flow/namespaces/ai_annotate.js +41 -0
  3. package/dist/es/idls/fornax_ml_flow/namespaces/aidpcallback.js +108 -0
  4. package/dist/es/idls/fornax_ml_flow/namespaces/annotation_job.js +52 -0
  5. package/dist/es/idls/fornax_ml_flow/namespaces/base.js +0 -0
  6. package/dist/es/idls/fornax_ml_flow/namespaces/batch_infer.js +72 -0
  7. package/dist/es/idls/fornax_ml_flow/namespaces/dataprocess.js +10 -0
  8. package/dist/es/idls/fornax_ml_flow/namespaces/dataset.js +36 -0
  9. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2.js +139 -0
  10. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2job.js +40 -0
  11. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2lineage.js +25 -0
  12. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2similarity.js +12 -0
  13. package/dist/es/idls/fornax_ml_flow/namespaces/filter.js +0 -0
  14. package/dist/es/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.js +36 -0
  15. package/dist/es/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.js +318 -0
  16. package/dist/es/idls/fornax_ml_flow/namespaces/fornax_domain_model.js +326 -0
  17. package/dist/es/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.js +327 -0
  18. package/dist/es/idls/fornax_ml_flow/namespaces/openapi.js +0 -0
  19. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.js +0 -0
  20. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.js +0 -0
  21. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.js +0 -0
  22. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +0 -0
  23. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.js +0 -0
  24. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.js +0 -0
  25. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.js +0 -0
  26. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.js +0 -0
  27. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +0 -0
  28. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +0 -0
  29. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +0 -0
  30. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.js +0 -0
  31. package/dist/es/idls/fornax_ml_flow/namespaces/tag.js +33 -0
  32. package/dist/es/idls/prompt_api/index.js +2009 -0
  33. package/dist/es/idls/prompt_api/namespaces/base.js +0 -0
  34. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_callback.js +35 -0
  35. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.js +0 -0
  36. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_common.js +318 -0
  37. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_debug.js +0 -0
  38. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_manage.js +23 -0
  39. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_mcp.js +0 -0
  40. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_optimize.js +0 -0
  41. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_paas.js +43 -0
  42. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_platform.js +0 -0
  43. package/dist/es/idls/prompt_api/namespaces/mcp.js +9 -0
  44. package/dist/es/idls/prompt_api/namespaces/model.js +320 -0
  45. package/dist/es/idls/prompt_api/namespaces/permission.js +47 -0
  46. package/dist/es/idls/prompt_api/namespaces/release.js +25 -0
  47. package/dist/es/prompt-editor/index.js +1 -1
  48. package/dist/es/utils/model-config.js +3 -3
  49. package/dist/lib/idls/fornax_ml_flow/index.js +2414 -0
  50. package/dist/lib/idls/fornax_ml_flow/namespaces/ai_annotate.js +69 -0
  51. package/dist/lib/idls/fornax_ml_flow/namespaces/aidpcallback.js +140 -0
  52. package/dist/lib/idls/fornax_ml_flow/namespaces/annotation_job.js +82 -0
  53. package/dist/lib/idls/fornax_ml_flow/namespaces/base.js +16 -0
  54. package/dist/lib/idls/fornax_ml_flow/namespaces/batch_infer.js +105 -0
  55. package/dist/lib/idls/fornax_ml_flow/namespaces/dataprocess.js +34 -0
  56. package/dist/lib/idls/fornax_ml_flow/namespaces/dataset.js +63 -0
  57. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2.js +177 -0
  58. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2job.js +68 -0
  59. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2lineage.js +50 -0
  60. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2similarity.js +37 -0
  61. package/dist/lib/idls/fornax_ml_flow/namespaces/filter.js +16 -0
  62. package/dist/lib/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.js +62 -0
  63. package/dist/lib/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.js +378 -0
  64. package/dist/lib/idls/fornax_ml_flow/namespaces/fornax_domain_model.js +384 -0
  65. package/dist/lib/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.js +385 -0
  66. package/dist/lib/idls/fornax_ml_flow/namespaces/openapi.js +16 -0
  67. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.js +16 -0
  68. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.js +16 -0
  69. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.js +16 -0
  70. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +16 -0
  71. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.js +16 -0
  72. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.js +16 -0
  73. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.js +16 -0
  74. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.js +16 -0
  75. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +16 -0
  76. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +16 -0
  77. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +16 -0
  78. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.js +16 -0
  79. package/dist/lib/idls/fornax_ml_flow/namespaces/tag.js +60 -0
  80. package/dist/lib/idls/prompt_api/index.js +2071 -0
  81. package/dist/lib/idls/prompt_api/namespaces/base.js +16 -0
  82. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_callback.js +62 -0
  83. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.js +16 -0
  84. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_common.js +378 -0
  85. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_debug.js +16 -0
  86. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_manage.js +49 -0
  87. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_mcp.js +16 -0
  88. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_optimize.js +16 -0
  89. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_paas.js +72 -0
  90. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_platform.js +16 -0
  91. package/dist/lib/idls/prompt_api/namespaces/mcp.js +33 -0
  92. package/dist/lib/idls/prompt_api/namespaces/model.js +377 -0
  93. package/dist/lib/idls/prompt_api/namespaces/permission.js +72 -0
  94. package/dist/lib/idls/prompt_api/namespaces/release.js +50 -0
  95. package/dist/lib/prompt-editor/index.js +1 -1
  96. package/dist/lib/utils/model-config.js +13 -3
  97. package/dist/types/idls/fornax_ml_flow/index.d.ts +779 -0
  98. package/dist/types/idls/fornax_ml_flow/namespaces/ai_annotate.d.ts +102 -0
  99. package/dist/types/idls/fornax_ml_flow/namespaces/aidpcallback.d.ts +227 -0
  100. package/dist/types/idls/fornax_ml_flow/namespaces/annotation_job.d.ts +402 -0
  101. package/dist/types/idls/fornax_ml_flow/namespaces/base.d.ts +18 -0
  102. package/dist/types/idls/fornax_ml_flow/namespaces/batch_infer.d.ts +331 -0
  103. package/dist/types/idls/fornax_ml_flow/namespaces/dataprocess.d.ts +16 -0
  104. package/dist/types/idls/fornax_ml_flow/namespaces/dataset.d.ts +88 -0
  105. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2.d.ts +462 -0
  106. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2job.d.ts +180 -0
  107. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2lineage.d.ts +69 -0
  108. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2similarity.d.ts +8 -0
  109. package/dist/types/idls/fornax_ml_flow/namespaces/filter.d.ts +39 -0
  110. package/dist/types/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.d.ts +88 -0
  111. package/dist/types/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.d.ts +370 -0
  112. package/dist/types/idls/fornax_ml_flow/namespaces/fornax_domain_model.d.ts +320 -0
  113. package/dist/types/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.d.ts +510 -0
  114. package/dist/types/idls/fornax_ml_flow/namespaces/openapi.d.ts +6 -0
  115. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.d.ts +106 -0
  116. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.d.ts +256 -0
  117. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.d.ts +73 -0
  118. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.d.ts +94 -0
  119. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.d.ts +11 -0
  120. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.d.ts +24 -0
  121. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.d.ts +653 -0
  122. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.d.ts +83 -0
  123. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.d.ts +81 -0
  124. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.d.ts +24 -0
  125. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.d.ts +260 -0
  126. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.d.ts +111 -0
  127. package/dist/types/idls/fornax_ml_flow/namespaces/tag.d.ts +109 -0
  128. package/dist/types/idls/prompt_api/index.d.ts +667 -0
  129. package/dist/types/idls/prompt_api/namespaces/base.d.ts +18 -0
  130. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_callback.d.ts +102 -0
  131. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.d.ts +81 -0
  132. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_common.d.ts +1270 -0
  133. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_debug.d.ts +197 -0
  134. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_manage.d.ts +769 -0
  135. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_mcp.d.ts +301 -0
  136. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_optimize.d.ts +155 -0
  137. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_paas.d.ts +198 -0
  138. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_platform.d.ts +230 -0
  139. package/dist/types/idls/prompt_api/namespaces/mcp.d.ts +95 -0
  140. package/dist/types/idls/prompt_api/namespaces/model.d.ts +315 -0
  141. package/dist/types/idls/prompt_api/namespaces/permission.d.ts +52 -0
  142. package/dist/types/idls/prompt_api/namespaces/release.d.ts +62 -0
  143. package/dist/types/model-config-editor/basic-type.d.ts +2 -2
  144. package/dist/types/model-config-editor/model-config-form.d.ts +1 -1
  145. package/dist/types/model-config-editor/popover-type.d.ts +3 -3
  146. package/dist/types/model-select/index.d.ts +1 -1
  147. package/dist/types/model-select/model-option/index.d.ts +1 -1
  148. package/dist/types/prompt-editor/index.d.ts +1 -1
  149. package/dist/types/utils/model-config.d.ts +4 -4
  150. package/package.json +5 -3
@@ -0,0 +1,331 @@
1
+ import * as datasetv2 from './datasetv2';
2
+ import * as datasetv2job from './datasetv2job';
3
+ export type Int64 = string | number;
4
+ export declare enum BatchInferDatasetType {
5
+ DatasetV2 = 0,
6
+ HDFS = 1,
7
+ TOS = 2,
8
+ }
9
+ export declare enum BatchInferTaskStatus {
10
+ Preparing = 0,
11
+ Launching = 1,
12
+ Inferring = 2,
13
+ Exporting = 3,
14
+ Success = 4,
15
+ Failed = 5,
16
+ Terminated = 6,
17
+ }
18
+ export declare enum InputConfigType {
19
+ Raw = 1,
20
+ }
21
+ export declare enum MerlinQuotaPoolType {
22
+ /** 稳定资源 */
23
+ Default = 0,
24
+ /** 潮汐资源 */
25
+ Hybrid = 1,
26
+ /** 常混资源 */
27
+ HybridShare = 2,
28
+ /** 第三方资源ali */
29
+ ALI = 3,
30
+ /** 第三方资源hw */
31
+ HW = 4,
32
+ /** hw arm */
33
+ HWARM = 5,
34
+ /** 弹性售卖资源,随时可能被抢占 */
35
+ Spot = 6,
36
+ /** 可抢占的稳定资源,merlin seed离线推理不允许选这种资源 */
37
+ Preemptible = 20,
38
+ }
39
+ export declare enum MerlinSeedDataProcessType {
40
+ /** 普通生成任务 */
41
+ RayDataset = 1,
42
+ /** 多轮生成任务 */
43
+ RayDatasetMultiround = 2,
44
+ }
45
+ export declare enum MerlinSeedModelType {
46
+ HDFS = 1,
47
+ ModelCard = 2,
48
+ }
49
+ export declare enum OutputConfigType {
50
+ Raw = 1,
51
+ }
52
+ export declare enum Provider {
53
+ /** GPTOpenAPI = 1 // GPT OpenAPI平台
54
+ 火山方舟 */
55
+ Maas = 2,
56
+ /** BotEngine = 3 // 暂时特指seed从bot_engine接入
57
+ merlin平台 */
58
+ Merlin = 4,
59
+ /** merlin-seed平台 */
60
+ MerlinSeed = 5,
61
+ }
62
+ export declare enum TrainingMethod {
63
+ LoRA = 1,
64
+ Full = 2,
65
+ }
66
+ export declare enum TrainingType {
67
+ SftFineTuning = 1,
68
+ }
69
+ export interface ArkModel {
70
+ foundationModelName?: string;
71
+ foundationModelVersion?: string;
72
+ /** 如果是精调后的模型,这个id非空 */
73
+ customModelID?: string;
74
+ sftTaskID?: string;
75
+ /** 训练类型 */
76
+ trainingType?: TrainingType;
77
+ /** 训练方法 */
78
+ trainingMethod?: TrainingMethod;
79
+ }
80
+ export interface BatchInferDataset {
81
+ datasetID?: string;
82
+ inputConfig?: InputConfig;
83
+ outputConfig?: OutputConfig;
84
+ /** 默认是数据集v2,本期新增hdfs和tos */
85
+ datasetType?: BatchInferDatasetType;
86
+ /** 待推理的数据集hdfs路径 */
87
+ hdfsPath?: string;
88
+ /** 待推理的图片存储的文件夹路径 */
89
+ imageHdfsPath?: string;
90
+ /** 输出结果保存的hdfs路径 */
91
+ outputHdfsPath?: string;
92
+ /** 待推理的数据集的tos桶名 */
93
+ tosBucketName?: string;
94
+ /** 待推理的数据集的tos对象名称 */
95
+ tosObjKey?: string;
96
+ /** 输出结果保存的tos桶名 */
97
+ outputTosBucketName?: string;
98
+ /** 输出结果保存的tos对象名称 */
99
+ outputTosObjKey?: string;
100
+ }
101
+ export interface BatchInferParam {
102
+ temperature?: number;
103
+ topP?: number;
104
+ topK?: string;
105
+ maxNewToken?: string;
106
+ maxContextToken?: string;
107
+ /** 推理次数 */
108
+ inferTimes?: string;
109
+ /** 推理批次大小 */
110
+ batchSize?: string;
111
+ }
112
+ export interface BatchInferTask {
113
+ /** 创建时不传 */
114
+ id?: Int64;
115
+ name?: string;
116
+ desc?: string;
117
+ batchInferParam?: BatchInferParam;
118
+ provider?: Provider;
119
+ providerInfo?: ProviderInfo;
120
+ providerTaskID?: string;
121
+ batchInferDatasets?: Array<BatchInferDataset>;
122
+ ckptConfigs?: Record<string, CkptConfig>;
123
+ status?: BatchInferTaskStatus;
124
+ errCode?: string;
125
+ errMsg?: string;
126
+ ckptExecRes?: CkptExecResult;
127
+ /** Fornax空间ID */
128
+ spaceID?: string;
129
+ /** 创建人ID */
130
+ createdBy?: string;
131
+ /** 创建时间,秒 */
132
+ createdAt?: string;
133
+ /** 更新人ID */
134
+ updatedBy?: string;
135
+ /** 更新时间,秒 */
136
+ updatedAt?: string;
137
+ }
138
+ export interface CkptConfig {
139
+ name?: string;
140
+ maxRetryTime?: string;
141
+ retryIntervalMilliSecond?: string;
142
+ /** 重试时间间隔的变化方式,支持固定间隔和随时间渐进式变化 */
143
+ retryIntervalChangeType?: string;
144
+ /** 每重试x次,重试时间间隔会发生变化 */
145
+ retryIntervalChangeTimes?: string;
146
+ /** 每次重试时间间隔变化的步长,单位为ms,可以为负数 */
147
+ retryIntervalChangeStep?: string;
148
+ customConfigs?: Record<string, string>;
149
+ /** 触发下一个checkpoint的时间间隔,单位为ms */
150
+ triggerNextCkptIntervalMilliSecond?: string;
151
+ }
152
+ export interface CkptExecResult {
153
+ /** 上传数据集到HDFS [1,10)
154
+ 数据集上传到hdfs的地址 */
155
+ datasetHdfsAddress?: string;
156
+ /** 上传进度,长度与 batchInferDatasets 相同 */
157
+ datasetUploadProgresses?: Array<InferUploadProgress>;
158
+ /** 传入离线推理任务的数据列名 */
159
+ inferTaskColumnName?: string;
160
+ /** item id 所在的列名 */
161
+ itemIDColumnName?: string;
162
+ /** dataset id 所在的列名 */
163
+ datasetIDColumnName?: string;
164
+ /** 数据集上传到 tos 的 bucket */
165
+ datasetTosBucket?: string;
166
+ /** 数据集上传到 tos 的object key */
167
+ datasetTosObjectKey?: string;
168
+ /** 创建推理任务 [10,20)
169
+ merlin seed离线推理任务实际上就是在merlin任务用例外包了一层,在这里记录这个merlin任务用例id */
170
+ merlinJobID?: string;
171
+ /** merlin seed离线推理任务链接 */
172
+ merlinDataProcessTaskUrl?: string;
173
+ /** 第三方平台任务链接 */
174
+ providerTaskUrl?: string;
175
+ /** 检查推理任务状态 [20,30)
176
+ merlin推理任务状态 */
177
+ merlinDataProcessInstanceStatusGroup?: string;
178
+ /** merlin推理任务状态详情 */
179
+ merlinDataProcessInstanceStatus?: string;
180
+ /** merlin 任务实例是否终止 */
181
+ merlinJobTerminated?: boolean;
182
+ /** merlin 任务实例状态 */
183
+ merlinJobStatus?: string;
184
+ /** merlin 任务实例错误信息 */
185
+ merlinJobErrMsg?: string;
186
+ /** 有merlin 任务实例上报的错误信息 */
187
+ merlinJobUploadedErrMsg?: string;
188
+ /** 方舟任务状态 */
189
+ arkJobStatus?: string;
190
+ /** 方舟任务状态说明 */
191
+ arkJobDetail?: string;
192
+ /** 方舟任务状态更新时间 */
193
+ arkJobStatusUpdateTimeMs?: Int64;
194
+ /** 导出推理结果 [30,40)
195
+ 推理结果输出的列名 */
196
+ inferResultColumnName?: string;
197
+ /** 推理结果保存的hdfs地址,可能为文件夹 */
198
+ inferResultHdfsAddress?: string;
199
+ /** 结果是否导出完成 */
200
+ resultExported?: boolean;
201
+ /** 推理结果导出进度 */
202
+ inferExportProgress?: InferExportProgress;
203
+ }
204
+ export interface InferExportProgress {
205
+ /** 推理结果的存储平台 */
206
+ provider?: datasetv2.StorageProvider;
207
+ /** 推理结果的文件格式,如果结果的路径是文件夹,那么只导出这个文件夹下所有该格式的文件 */
208
+ fileFormat?: datasetv2job.FileFormat;
209
+ /** 导出结果的地址,可以是文件夹 */
210
+ path?: string;
211
+ /** 子进度(所有结果文件的进度) */
212
+ subProgresses?: Array<InferExportProgress>;
213
+ /** 进度信息
214
+ 总行数 */
215
+ total?: Int64;
216
+ /** 已处理的行数 */
217
+ processed?: Int64;
218
+ /** 添加成功的行数 */
219
+ added?: Int64;
220
+ /** 运行日志
221
+ 错误信息,子进度中无该字段 */
222
+ errors?: Array<datasetv2.ItemErrorGroup>;
223
+ }
224
+ export interface InferUploadProgress {
225
+ /** 需要上传到的存储平台 */
226
+ provider?: datasetv2.StorageProvider;
227
+ /** 需要上传的文件格式 */
228
+ fileFormat?: datasetv2job.FileFormat;
229
+ /** 上传的地址 */
230
+ path?: string;
231
+ /** 子进度(所有上传文件的进度) */
232
+ subProgresses?: Array<InferExportProgress>;
233
+ /** 需要上传的数据集 ID,在子进度中无该字段 */
234
+ datasetID?: Int64;
235
+ /** 当前数据集上传的 cursor,在子进度中无该字段 */
236
+ cursor?: string;
237
+ /** 进度信息
238
+ 总行数 */
239
+ total?: Int64;
240
+ /** 已处理的行数 */
241
+ processed?: Int64;
242
+ }
243
+ export interface InputConfig {
244
+ type?: InputConfigType;
245
+ /** 作为输入的数据集列名 */
246
+ rawInput?: string;
247
+ /** 每行数据的唯一标识的列名 */
248
+ itemID?: string;
249
+ }
250
+ export interface MerlinModel {
251
+ /** 多记录一些额外信息,比如是基座模型还是训练后的模型,如果是训练后的模型,那么还需要记录训练任务的id
252
+ 模型文件保存地址 */
253
+ hdfsPath?: string;
254
+ /** 基座模型名称 */
255
+ foundationModelName?: string;
256
+ /** 3: optional string foundationModelFamily // 基座模型家族
257
+ 4: optional string foundationModelVendor // 基座模型厂商
258
+ 5: optional string foundationModelDisplayName // 基座模型显示名称
259
+ 6: optional i64 foundationModelVersionUpdateTimeInMs // 基座模型版本更新时间
260
+ 训练任务id,当训练任务非0时,说明此次批量推理使用的模型是训练后的产物 */
261
+ sftTaskID?: string;
262
+ /** 训练产物的名称(此时要求该产物已经导出到merlin的模型仓库中,因此这个name就是merlin的某个模型仓库名称) */
263
+ merlinModelName?: string;
264
+ /** merlin的某个模型仓库的版本 */
265
+ merlinModelVersion?: string;
266
+ /** 训练类型 */
267
+ trainingType?: TrainingType;
268
+ /** 训练方法 */
269
+ trainingMethod?: TrainingMethod;
270
+ }
271
+ export interface MerlinResource {
272
+ type?: MerlinQuotaPoolType;
273
+ /** 用户组id,暂时只支持1个 */
274
+ groupIDs?: Array<string>;
275
+ /** 集群id */
276
+ clusterID?: string;
277
+ /** 是否使用可占用资源 */
278
+ preemptible?: boolean;
279
+ /** 角色配置,暂时只支持1个 */
280
+ roles?: Array<MerlinResourceRole>;
281
+ /** key是用户组id,val是用户组名称 */
282
+ groupNames?: Record<Int64, string>;
283
+ /** 集群名称 */
284
+ clusterName?: string;
285
+ }
286
+ export interface MerlinResourceRole {
287
+ /** 实例数,必填1 */
288
+ num?: number;
289
+ /** 虚拟gpu型号 */
290
+ gpuv?: string;
291
+ /** gpu数量 */
292
+ gpu?: number;
293
+ /** cpu数量 */
294
+ cpu?: number;
295
+ /** 内存大小,单位是MB */
296
+ memory?: number;
297
+ }
298
+ export interface MerlinSeedModel {
299
+ merlinSeedModelType?: MerlinSeedModelType;
300
+ hdfsAddress?: string;
301
+ modelCardID?: string;
302
+ modelCardName?: string;
303
+ modelParamConfigType?: string;
304
+ tokenizerAddress?: string;
305
+ networkConfig?: string;
306
+ quantConfig?: string;
307
+ }
308
+ export interface ModelCard {
309
+ id?: string;
310
+ name?: string;
311
+ }
312
+ export interface OutputConfig {
313
+ type?: OutputConfigType;
314
+ /** 输出会保存在这个数据集列名 */
315
+ rawOutput?: string;
316
+ /** 完整输出会保存在这个数据集列名(目前只支持方舟/开源模型/训练后的开源模型) */
317
+ completeOutput?: string;
318
+ }
319
+ export interface ProviderInfo {
320
+ provider?: Provider;
321
+ merlinSeedModel?: MerlinSeedModel;
322
+ merlinResource?: MerlinResource;
323
+ merlinCustomEnvs?: Record<string, string>;
324
+ merlinSeedDataProcessType?: MerlinSeedDataProcessType;
325
+ /** open source model */
326
+ merlinModel?: MerlinModel;
327
+ /** 方舟model */
328
+ arkModel?: ArkModel;
329
+ /** 方舟项目名称 */
330
+ arkProjectName?: string;
331
+ }
@@ -0,0 +1,16 @@
1
+ export type Int64 = string | number;
2
+ export declare enum UserScriptTemplateType {
3
+ UNSPECIFIED = 0,
4
+ /** 标签任务 */
5
+ ItemLabel = 1,
6
+ /** 常规数据处理任务 */
7
+ DataProcess = 2,
8
+ /** 转为训练数据集 */
9
+ FineTuning = 3,
10
+ }
11
+ export interface UserScriptTemplate {
12
+ /** 模版类型 */
13
+ user_script_template_type?: UserScriptTemplateType;
14
+ /** 模版内容 */
15
+ template?: string;
16
+ }
@@ -0,0 +1,88 @@
1
+ export type Int64 = string | number;
2
+ export declare enum DatasetIOTaskStatus {
3
+ Undefined = 0,
4
+ /** 正在初始化 */
5
+ Initializing = 1,
6
+ /** 正在运行 */
7
+ Running = 2,
8
+ /** 成功完成 */
9
+ Done = 3,
10
+ /** 失败 */
11
+ Failed = 4,
12
+ /** 手动终止 */
13
+ Terminated = 5,
14
+ /** 成功完成,但有错误 */
15
+ DoneWithError = 6,
16
+ }
17
+ export declare enum DatasetIOType {
18
+ Import = 1,
19
+ Export = 2,
20
+ }
21
+ export declare enum FileFormat {
22
+ JSONL = 1,
23
+ Parquet = 2,
24
+ CSV = 3,
25
+ /** 压缩格式 */
26
+ ZIP = 100,
27
+ }
28
+ export declare enum StorageProvider {
29
+ TOS = 1,
30
+ HDFS = 2,
31
+ VETOS = 3,
32
+ ImageX = 4,
33
+ /** 后端测试使用 */
34
+ LocalFS = 5,
35
+ }
36
+ /** DatasetIOTask 数据集导入导出文件任务 */
37
+ export interface DatasetIOTask {
38
+ id: string;
39
+ spaceID: string;
40
+ datasetID: string;
41
+ file: StorageFile;
42
+ ioType: DatasetIOType;
43
+ option?: DatasetIOTaskOption;
44
+ /** 运行数据, [10, 100) */
45
+ status?: DatasetIOTaskStatus;
46
+ progress?: DatasetIOTaskProgress;
47
+ logs?: Array<TaskLog>;
48
+ createdBy?: string;
49
+ createdAt?: string;
50
+ updatedBy?: string;
51
+ updatedAt?: string;
52
+ startedAt?: string;
53
+ endedAt?: string;
54
+ }
55
+ export interface DatasetIOTaskOption {
56
+ /** 覆盖数据集 */
57
+ overwriteDataset?: boolean;
58
+ /** 导出文件时,覆盖已有文件 */
59
+ overwriteFile?: boolean;
60
+ }
61
+ export interface DatasetIOTaskProgress {
62
+ /** 可空, 表示具体文件导入进度时, 值为文件名 */
63
+ name?: string;
64
+ /** 总量 */
65
+ total?: Int64;
66
+ /** 已处理数量 */
67
+ processed?: Int64;
68
+ /** 已成功处理的数量 */
69
+ added?: Int64;
70
+ /** 各文件的进度, 导入源为文件夹时使用 */
71
+ fileProgresses?: Array<DatasetIOTaskProgress>;
72
+ }
73
+ export interface StorageFile {
74
+ provider: StorageProvider;
75
+ path: string;
76
+ /** 数据文件的格式 */
77
+ format?: FileFormat;
78
+ /** 压缩包格式 */
79
+ compressFormat?: FileFormat;
80
+ /** path 为文件夹或压缩包时,数据文件列表, 服务端设置 */
81
+ files?: Array<string>;
82
+ }
83
+ export interface TaskLog {
84
+ content: string;
85
+ level: string;
86
+ timestamp: string;
87
+ hidden: boolean;
88
+ }