feat: 训练任务支持从最新 checkpoint 继续训练
- 后端: 新增 resume/checkpoints 端点,compute 客户端与适配器支持续训 - 计算节点: llama_factory 适配器断点续训支持及测试 - 前端: fine-tune API 封装与列表页续训/断点展示
This commit is contained in:
@@ -25,6 +25,22 @@ def test_build_command_uses_explicit_validation_dataset_without_resplitting() ->
|
||||
assert "--val_size" not in result.command
|
||||
|
||||
|
||||
def test_build_command_resumes_from_checkpoint() -> None:
|
||||
result = build_command(
|
||||
{
|
||||
"base_model": "/models/qwen",
|
||||
"dataset": "ygft_dataset_train",
|
||||
"dataset_dir": "/datasets/example",
|
||||
"output_dir": "/outputs/example",
|
||||
"resume_from_checkpoint": "/data/yg-ft/fine-tunes/ft_1/resume/checkpoint-50",
|
||||
}
|
||||
)
|
||||
|
||||
assert result.command[result.command.index("--resume_from_checkpoint") + 1] == (
|
||||
"/data/yg-ft/fine-tunes/ft_1/resume/checkpoint-50"
|
||||
)
|
||||
|
||||
|
||||
def _write(tmp_path, name: str, lines: list[dict]) -> object:
|
||||
path = tmp_path / name
|
||||
path.write_text(
|
||||
|
||||
Reference in New Issue
Block a user