24 lines
800 B
Python
24 lines
800 B
Python
|
|
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
|