bailian-cli-core 2.8.3 → 2.8.5
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.
- package/dist/index.d.mts +112 -12
- package/dist/index.mjs +39 -39
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1791,6 +1791,7 @@ interface ValueFlag {
|
|
|
1791
1791
|
description: LocalizedText;
|
|
1792
1792
|
valueHint: string;
|
|
1793
1793
|
required?: boolean;
|
|
1794
|
+
implicitValue?: boolean;
|
|
1794
1795
|
/**
|
|
1795
1796
|
* Restrict to a fixed set of values. The parser rejects anything else and the
|
|
1796
1797
|
* parsed type narrows to the union. Declare with `as const` so the literals
|
|
@@ -3085,9 +3086,8 @@ export declare function resolveFileUrl(input: string, apiKey: string, model: str
|
|
|
3085
3086
|
* Dataset API types.
|
|
3086
3087
|
*
|
|
3087
3088
|
* Maps DashScope `/api/v1/files` responses. The same endpoint backs every
|
|
3088
|
-
* dataset purpose the platform supports today
|
|
3089
|
-
*
|
|
3090
|
-
* purposes can be plugged in without schema changes.
|
|
3089
|
+
* dataset purpose the platform supports today — these types are deliberately
|
|
3090
|
+
* purpose-agnostic so new purposes can be plugged in without schema changes.
|
|
3091
3091
|
*/
|
|
3092
3092
|
/** A single uploaded dataset file as returned by the platform. */
|
|
3093
3093
|
export interface DatasetFile {
|
|
@@ -3099,7 +3099,7 @@ export interface DatasetFile {
|
|
|
3099
3099
|
size?: number;
|
|
3100
3100
|
/** Content hash (server-computed). */
|
|
3101
3101
|
md5?: string;
|
|
3102
|
-
/** Free-form purpose tag, e.g. "fine-tune"
|
|
3102
|
+
/** Free-form purpose tag, e.g. "fine-tune". */
|
|
3103
3103
|
purpose?: string;
|
|
3104
3104
|
/** Optional internal/external URL (kept for parity with the API). */
|
|
3105
3105
|
url?: string;
|
|
@@ -3176,7 +3176,7 @@ export interface DatasetUploadParams {
|
|
|
3176
3176
|
/**
|
|
3177
3177
|
* Purpose tag forwarded to the platform. Defaults to "fine-tune" because
|
|
3178
3178
|
* the API requires the field, but callers should set this explicitly when
|
|
3179
|
-
* uploading
|
|
3179
|
+
* uploading other dataset kinds.
|
|
3180
3180
|
*/
|
|
3181
3181
|
purpose?: string;
|
|
3182
3182
|
/** 已由调用方校验的不可变字节;提供时不再读取 filePath。 */
|
|
@@ -3926,6 +3926,59 @@ export interface GetFineTuneResponse {
|
|
|
3926
3926
|
output?: FineTuneJob;
|
|
3927
3927
|
data?: FineTuneJob;
|
|
3928
3928
|
}
|
|
3929
|
+
/**
|
|
3930
|
+
* GET /api/v1/fine-tunes/fine-tunes-params 的 `output.hyper_params[]` 元素。
|
|
3931
|
+
* `defaultValue` 是服务端保留的兼容字段名(与 recommend_value 同值),不改名为
|
|
3932
|
+
* default_value。`visibility` / `required` 等其他可选字段不在此依赖,缺失不算失败。
|
|
3933
|
+
*/
|
|
3934
|
+
export interface FineTuneParamHyperParam {
|
|
3935
|
+
name?: string;
|
|
3936
|
+
recommend_value?: string;
|
|
3937
|
+
defaultValue?: string;
|
|
3938
|
+
is_advanced_parameter?: boolean;
|
|
3939
|
+
display_name?: string;
|
|
3940
|
+
description?: string;
|
|
3941
|
+
type?: string;
|
|
3942
|
+
data_range?: string[];
|
|
3943
|
+
left_range?: string;
|
|
3944
|
+
right_range?: string;
|
|
3945
|
+
step?: number;
|
|
3946
|
+
support_values?: string[];
|
|
3947
|
+
editable?: boolean;
|
|
3948
|
+
/** `hyper` / `resource` */
|
|
3949
|
+
group?: string;
|
|
3950
|
+
[k: string]: unknown;
|
|
3951
|
+
}
|
|
3952
|
+
/** GET /api/v1/fine-tunes/fine-tunes-params response. */
|
|
3953
|
+
export interface GetFineTuneParamsResponse {
|
|
3954
|
+
request_id?: string;
|
|
3955
|
+
output?: {
|
|
3956
|
+
hyper_params?: FineTuneParamHyperParam[];
|
|
3957
|
+
/** Whether the training type supports resuming from a checkpoint. */
|
|
3958
|
+
resume_from_checkpoint?: boolean;
|
|
3959
|
+
[k: string]: unknown;
|
|
3960
|
+
};
|
|
3961
|
+
[k: string]: unknown;
|
|
3962
|
+
}
|
|
3963
|
+
/**
|
|
3964
|
+
* GET /api/v1/fine-tunes/{job_id}/basic_metrics 的 `output.metrics[]` 元素。
|
|
3965
|
+
* 每条指标记录的 JSON 原样返回(step + 动态指标字段),内部 key 不做改名。
|
|
3966
|
+
*/
|
|
3967
|
+
export interface BasicMetricRecord {
|
|
3968
|
+
[key: string]: unknown;
|
|
3969
|
+
}
|
|
3970
|
+
/** GET /api/v1/fine-tunes/{job_id}/basic_metrics response. 空指标列表是正常结果。 */
|
|
3971
|
+
export interface ListBasicMetricsResponse {
|
|
3972
|
+
request_id?: string;
|
|
3973
|
+
output?: {
|
|
3974
|
+
page_no?: number;
|
|
3975
|
+
page_size?: number;
|
|
3976
|
+
total?: number;
|
|
3977
|
+
metrics?: BasicMetricRecord[];
|
|
3978
|
+
[k: string]: unknown;
|
|
3979
|
+
};
|
|
3980
|
+
[k: string]: unknown;
|
|
3981
|
+
}
|
|
3929
3982
|
/** A tunable hyper-parameter declared by a compression template. */
|
|
3930
3983
|
export interface CompressHyperParameter {
|
|
3931
3984
|
name?: string;
|
|
@@ -4073,6 +4126,45 @@ export interface GetFineTuneLogsParams {
|
|
|
4073
4126
|
}
|
|
4074
4127
|
/** GET /api/v1/fine-tunes/{job_id}/logs */
|
|
4075
4128
|
export declare function getFineTuneLogs(client: Client, jobId: string, params?: GetFineTuneLogsParams): Promise<GetFineTuneLogsResponse>;
|
|
4129
|
+
export interface GetFineTuneParamsParams {
|
|
4130
|
+
/** Base model ID, e.g. qwen3-14b. */
|
|
4131
|
+
inputModel: string;
|
|
4132
|
+
/** Server training_type: sft | efficient_sft | dpo_full | dpo_lora | cpt. */
|
|
4133
|
+
trainingType: string;
|
|
4134
|
+
/** MTU spec code; forwarded when present (resource params queries). */
|
|
4135
|
+
mtuSpecCode?: string;
|
|
4136
|
+
/** `hyper` / `resource`; omit to return all groups. */
|
|
4137
|
+
paramType?: string;
|
|
4138
|
+
/**
|
|
4139
|
+
* Training-option context, sent as a single `hyper_parameters` query
|
|
4140
|
+
* parameter holding the JSON-serialized object (e.g. modality /
|
|
4141
|
+
* reasoning_mode). Omit when the model has no dynamic train options.
|
|
4142
|
+
*/
|
|
4143
|
+
trainOptions?: Record<string, string>;
|
|
4144
|
+
/** Explicit locale for server-side display text; omit for the server default. */
|
|
4145
|
+
lang?: string;
|
|
4146
|
+
/** Sent as X-DashScope-WorkSpace; use the job's owning workspace. */
|
|
4147
|
+
workspaceId?: string;
|
|
4148
|
+
signal?: AbortSignal;
|
|
4149
|
+
}
|
|
4150
|
+
/**
|
|
4151
|
+
* GET /api/v1/fine-tunes/fine-tunes-params — training hyper-parameter config.
|
|
4152
|
+
* Empty/absent optional fields in each hyper_params entry are not failures.
|
|
4153
|
+
*/
|
|
4154
|
+
export declare function getFineTuneParams(client: Client, params: GetFineTuneParamsParams): Promise<GetFineTuneParamsResponse>;
|
|
4155
|
+
export interface ListBasicMetricsParams {
|
|
4156
|
+
pageNo?: number;
|
|
4157
|
+
pageSize?: number;
|
|
4158
|
+
/** Sent as X-DashScope-WorkSpace; use the job's owning workspace. */
|
|
4159
|
+
workspaceId?: string;
|
|
4160
|
+
signal?: AbortSignal;
|
|
4161
|
+
}
|
|
4162
|
+
/**
|
|
4163
|
+
* GET /api/v1/fine-tunes/{job_id}/basic_metrics — training metrics.
|
|
4164
|
+
* An empty `output.metrics` list is a normal result. No server-side metric
|
|
4165
|
+
* type filter: the full result is returned and callers pick metric keys.
|
|
4166
|
+
*/
|
|
4167
|
+
export declare function listBasicMetrics(client: Client, jobId: string, params?: ListBasicMetricsParams): Promise<ListBasicMetricsResponse>;
|
|
4076
4168
|
/** GET /api/v1/fine-tunes/{job_id}/checkpoints */
|
|
4077
4169
|
export declare function listCheckpoints(client: Client, jobId: string, signal?: AbortSignal): Promise<ListCheckpointsResponse>;
|
|
4078
4170
|
/**
|
|
@@ -4238,11 +4330,7 @@ export interface BatchSizeGateInput {
|
|
|
4238
4330
|
* platform.
|
|
4239
4331
|
*/
|
|
4240
4332
|
recordCount: number;
|
|
4241
|
-
/**
|
|
4242
|
-
* Effective batch_size the job will run with — after the CLI's clamp
|
|
4243
|
-
* ([8, 1024]) and small-file auto-adjust, or the platform default (16) when
|
|
4244
|
-
* neither the user nor auto-adjust set one.
|
|
4245
|
-
*/
|
|
4333
|
+
/** Effective batch_size from the user override or the model-specific service default. */
|
|
4246
4334
|
batchSize: number;
|
|
4247
4335
|
}
|
|
4248
4336
|
export interface BatchSizeGateResult {
|
|
@@ -4267,6 +4355,15 @@ export interface BatchSizeGateResult {
|
|
|
4267
4355
|
* pre-check, and the hint nudges users to leave margin for the split.
|
|
4268
4356
|
*/
|
|
4269
4357
|
export declare function preflightBatchSizeGate(input: BatchSizeGateInput): BatchSizeGateResult;
|
|
4358
|
+
export type FineTuneHyperParameterIssueCode = "unsupported" | "not_editable" | "invalid_type" | "not_supported" | "out_of_range" | "invalid_step";
|
|
4359
|
+
export interface FineTuneHyperParameterIssue {
|
|
4360
|
+
parameter: string;
|
|
4361
|
+
value: unknown;
|
|
4362
|
+
code: FineTuneHyperParameterIssueCode;
|
|
4363
|
+
expected?: string;
|
|
4364
|
+
}
|
|
4365
|
+
export declare function validateFineTuneHyperParameterOverrides(schema: FineTuneParamHyperParam[], overrides: Record<string, unknown>): FineTuneHyperParameterIssue[];
|
|
4366
|
+
export declare function getFineTuneHyperParameterDefaultNumber(schema: FineTuneParamHyperParam[], parameter: string): number | undefined;
|
|
4270
4367
|
//#endregion
|
|
4271
4368
|
//#region src/finetune/profiles/registry.d.ts
|
|
4272
4369
|
/** Look up a profile by its CLI training-type name. Throws USAGE if unknown. */
|
|
@@ -5323,7 +5420,7 @@ export declare function resolveBooleanFlag(flagValue: unknown, defaultWhenUnset:
|
|
|
5323
5420
|
export declare function resolveWatermark(flagValue: unknown, configuredValue?: boolean): boolean;
|
|
5324
5421
|
//#endregion
|
|
5325
5422
|
//#region src/telemetry/caller.d.ts
|
|
5326
|
-
/** Parse BAILIAN_CALLER_*.
|
|
5423
|
+
/** Parse BAILIAN_CALLER_*. Explicit agent/ai_agent → agent; explicit script → script; everything else → unknown. */
|
|
5327
5424
|
type CallerAttribution = {
|
|
5328
5425
|
callerType: "unknown";
|
|
5329
5426
|
} | {
|
|
@@ -5331,6 +5428,9 @@ type CallerAttribution = {
|
|
|
5331
5428
|
callerName: string;
|
|
5332
5429
|
skillName?: string;
|
|
5333
5430
|
skillVersion?: string;
|
|
5431
|
+
} | {
|
|
5432
|
+
callerType: "script";
|
|
5433
|
+
callerName: string;
|
|
5334
5434
|
};
|
|
5335
5435
|
/** Env-only attribution; no TTY or install-path heuristics. */
|
|
5336
5436
|
export declare function readCaller(env: NodeJS.ProcessEnv): CallerAttribution;
|
|
@@ -5351,7 +5451,7 @@ interface TrackingEvent {
|
|
|
5351
5451
|
os: string;
|
|
5352
5452
|
authMethod?: AuthRequirement;
|
|
5353
5453
|
params?: Record<string, unknown>;
|
|
5354
|
-
/** Always present on new CLI events: `agent`
|
|
5454
|
+
/** Always present on new CLI events: `agent` | `script` | `unknown`. */
|
|
5355
5455
|
callerType: CallerAttribution["callerType"];
|
|
5356
5456
|
callerName?: string;
|
|
5357
5457
|
skillName?: string;
|