fix(data-process): 发布精确三路数据切分
This commit is contained in:
23
compute/tests/test_llama_factory_adapter.py
Normal file
23
compute/tests/test_llama_factory_adapter.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from compute.engines.llama_factory.adapter import build_command
|
||||
|
||||
|
||||
def test_build_command_uses_explicit_validation_dataset_without_resplitting() -> None:
|
||||
result = build_command(
|
||||
{
|
||||
"base_model": "/models/qwen",
|
||||
"dataset": "ygft_dataset_train",
|
||||
"eval_dataset": "ygft_dataset_validation",
|
||||
"dataset_dir": "/datasets/example",
|
||||
"output_dir": "/outputs/example",
|
||||
"val_size": 0.1,
|
||||
}
|
||||
)
|
||||
|
||||
assert result.command[result.command.index("--dataset") + 1] == "ygft_dataset_train"
|
||||
assert result.command[result.command.index("--eval_dataset") + 1] == (
|
||||
"ygft_dataset_validation"
|
||||
)
|
||||
assert "--do_eval" in result.command
|
||||
assert "--val_size" not in result.command
|
||||
Reference in New Issue
Block a user