Skip to content

开启use_flash_ckpt时,出错 #9912

Description

@LeterTao

Checklist / 检查清单

  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。

Bug Description / Bug 描述

设置--use_flash_ckpt true时,训练中途会报错FileNotFoundError: [Errno 2] No such file or directory: ''但是不影响训练
训练结束时会报错
[rank0]: TypeError: CheckpointEngine.wait_latest_checkpoint() takes from 1 to 2 positional arguments but 3 were given
[rank0]: TypeError: HfFlashCheckpointer.save_checkpoint_to_storage() takes 2 positional arguments but 3 were given
查了下dlrover里面的调用是:
save_checkpoint_to_storage(step)
wait_latest_checkpoint(timeout)
而ms-swift里面是trainers/mixin.py:
save_checkpoint_to_storage(step, True)
wait_latest_checkpoint(timeout, max_steps)

How to Reproduce / 如何复现

脚本:
NPROC_PER_NODE=2
CUDA_VISIBLE_DEVICES=0,1
swift sft
--model Qwen/Qwen3-0.6B
--dataset AI-ModelScope/alpaca-gpt4-data-zh#1000
--split_dataset_ratio 0.01
--torch_dtype bfloat16
--tuner_type lora
--target_modules all-linear
--lora_rank 8
--lora_alpha 32
--num_train_epochs 1
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--gradient_accumulation_steps 8
--learning_rate 1e-4
--max_length 2048
--save_steps 20
--eval_steps 20
--save_total_limit 2
--use_flash_ckpt true
--logging_steps 10
--output_dir output/npu-modelscope-qwen3-0_6b-lora_deepspeed
版本:
ms_swift 4.5.0.dev0
dlrover 0.6.1

Additional Information / 补充信息

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions