@@ -250,31 +250,27 @@ const CREATE_FLAGS = {
250250 valueHint : "<n>" ,
251251 description : "Max sequence length" ,
252252 } ,
253- yes : {
254- type : "switch" ,
255- description : "Confirm job creation (required to submit; uploads data and consumes quota)" ,
256- } ,
257253} satisfies FlagsDef ;
258254
259255export default defineCommand ( {
260256 description : "Create a fine-tune job (sft | sft-lora | dpo | dpo-lora | cpt)" ,
261257 auth : "apiKey" ,
262258 usageArgs :
263- "--model <model> --datasets <id|path,...> [--validations <id|path,...>] [--model-name <name>] [--suffix <text>] [--n-epochs <n>] [--batch-size <n>] [--learning-rate <str>] [--max-length <n>] [--training-type <sft|sft-lora|dpo|dpo-lora|cpt>] --yes " ,
259+ "--model <model> --datasets <id|path,...> [--validations <id|path,...>] [--model-name <name>] [--suffix <text>] [--n-epochs <n>] [--batch-size <n>] [--learning-rate <str>] [--max-length <n>] [--training-type <sft|sft-lora|dpo|dpo-lora|cpt>]" ,
264260 flags : CREATE_FLAGS ,
265261 exampleArgs : [
266- "--model qwen3-8b --datasets file-xxx --yes " ,
267- "--model qwen3-8b --datasets ./train.jsonl --yes " ,
268- "--model qwen3-8b --datasets ./train.jsonl --validations ./eval.jsonl --yes " ,
269- "--model qwen3-8b --datasets file-aaa,./extra.jsonl --yes " ,
270- "--model qwen3-8b --datasets ./train.jsonl --training-type sft --yes " ,
271- '--model qwen3-8b --datasets file-xxx --learning-rate "1.6e-5" --n-epochs 4 --yes ' ,
272- "--model qwen3-8b --datasets file-xxx --yes -- output json" ,
262+ "--model qwen3-8b --datasets file-xxx" ,
263+ "--model qwen3-8b --datasets ./train.jsonl" ,
264+ "--model qwen3-8b --datasets ./train.jsonl --validations ./eval.jsonl" ,
265+ "--model qwen3-8b --datasets file-aaa,./extra.jsonl" ,
266+ "--model qwen3-8b --datasets ./train.jsonl --training-type sft" ,
267+ '--model qwen3-8b --datasets file-xxx --learning-rate "1.6e-5" --n-epochs 4' ,
268+ "--model qwen3-8b --datasets file-xxx --output json" ,
273269 "--model qwen3-8b --datasets file-xxx --dry-run" ,
274270 ] ,
275271 notes : [
276- "Creating a job consumes training quota, so --yes is required to submit " ,
277- "(use --dry-run to preview the request body without --yes) ." ,
272+ "Creating a job uploads any local datasets and consumes training quota. " ,
273+ "Use --dry-run to preview the request body without submitting ." ,
278274 "Training-type values use the `<method>` / `<method>-lora` convention:" ,
279275 "sft (full) | sft-lora (LoRA) | dpo (full) | dpo-lora (LoRA) | cpt. These map" ,
280276 "to the server's training_type at the interface boundary, so the rest of the" ,
@@ -443,18 +439,8 @@ export default defineCommand({
443439 }
444440 }
445441
446- // --yes gate — BEFORE upload: without it we must not silently consume
447- // quota OR upload any file. (Local validation is still allowed to run.)
448- if ( ! settings . dryRun && ! flags . yes ) {
449- throw new BailianError (
450- "Refusing to create a fine-tune job without --yes." ,
451- ExitCode . USAGE ,
452- "Pass --yes to confirm creation (uploads datasets and consumes training quota), or --dry-run to preview the request." ,
453- ) ;
454- }
455-
456442 // Upload local paths now that pre-flight (validation, batch-size gate,
457- // capability check, --yes gate ) has cleared them. This swaps the
443+ // capability check) has cleared them. This swaps the
458444 // placeholder path entries in `training.fileIds` / `validation?.fileIds`
459445 // for real file-ids, so the body below sees ids.
460446 if ( ! settings . dryRun ) {
0 commit comments