mirror of
https://github.com/hanzo-ml/trainer.git
synced 2026-09-24 00:31:34 +00:00
* test(torch): add unit tests for getModelFromRuntimeRef Cover the runtime-ref name parsing used to resolve the TorchTune pretrained model: normalization of valid names and the empty-string fallback for malformed refs (wrong number of parts, empty input). Signed-off-by: yassinnouh21 <[email protected]> * test(torch): add unit tests for isLoraConfigEnabled Cover LoRA detection from trainer args: the model.lora_attn_modules marker present, absent, and the empty-args case. Signed-off-by: yassinnouh21 <[email protected]> * test(torch): add unit tests for isUseQLoraFinetune Cover QLoRA detection from trainer args, including the DoRA short-circuit that disables QLoRA even when quantize_base is set. Signed-off-by: yassinnouh21 <[email protected]> * test(torch): add unit tests for getRecipeAndConfig Cover the recipe/config selection matrix: single-device, single-node multi-GPU, and multi-node, each across full / LoRA / QLoRA fine-tuning. Signed-off-by: yassinnouh21 <[email protected]> * test(torch): add unit tests for extractOverridesFromRuntime Cover extraction of immutable runtime config overrides from the JobSet template: trainer-ancestor node container returns only immutable configs, while non-trainer ancestors, non-node containers, and an absent template yield no overrides. Signed-off-by: yassinnouh21 <[email protected]> * test(torch): use year-less copyright header Align the new test file with the repo boilerplate (hack/boilerplate/boilerplate.go.txt) and CNCF/LF guidance, which drop the year from the copyright notice. Signed-off-by: yassinnouh21 <[email protected]> * test(torch): cover integer numProcPerNode in getRecipeAndConfig Exercise integer numProcPerNode counts alongside the existing "auto" cases: numProcPerNode=1 forces the single-device recipe even with multiple GPUs, while a count >1 takes the distributed path. Signed-off-by: yassinnouh21 <[email protected]> * fix(torch): respect boolean value when detecting QLoRA args isUseQLoraFinetune matched quantize_base/use_dora by key only, so model.quantize_base=False enabled QLoRA and model.use_dora=False short-circuited it off. Parse the key=value pair and only treat a truthy value as enabled. Add =False regression cases. Signed-off-by: yassinnouh21 <[email protected]> --------- Signed-off-by: yassinnouh21 <[email protected]>