26
26
TRAIN_PATH = "./examples"
27
27
CONFIG_PATH = "./examples/config"
28
28
OUTPUT_DIR = tempfile .TemporaryDirectory ().name
29
- MODEL_NAME_OR_PATH = "PaddleFormers /tiny-random-qwen3"
29
+ MODEL_NAME_OR_PATH = "./models /tiny-random-qwen3"
30
30
31
31
os .environ ["NVIDIA_TF32_OVERRIDE" ] = "0"
32
32
os .environ ["NCCL_ALGO" ] = "Tree"
@@ -123,7 +123,7 @@ def test_sft_full(self):
123
123
train_path ,
124
124
updated_config_path ,
125
125
]
126
- training_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True )
126
+ training_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True , timeout = 150 )
127
127
128
128
# test training result
129
129
self .sfttrain_tester .assert_result (training_p .returncode , training_p .stdout )
@@ -133,7 +133,7 @@ def test_sft_full(self):
133
133
self .sfttrain_tester .assert_loss (training_p .stdout , EXCEPTED_LOSS )
134
134
135
135
# test model resume
136
- reusme_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True )
136
+ reusme_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True , timeout = 150 )
137
137
self .sfttrain_tester .assert_result (reusme_p .returncode , reusme_p .stdout )
138
138
139
139
EXCEPTED_LOSS = 9.550503
@@ -172,7 +172,7 @@ def test_sft_lora(self):
172
172
train_path ,
173
173
updated_config_path ,
174
174
]
175
- training_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True )
175
+ training_p = subprocess .run (cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True , timeout = 150 )
176
176
177
177
# test training result
178
178
self .sfttrain_tester .assert_result (training_p .returncode , training_p .stdout )
@@ -200,7 +200,9 @@ def test_sft_lora(self):
200
200
"--output_path" ,
201
201
lora_merge_output_dir ,
202
202
]
203
- lora_merge_p = subprocess .run (lora_merge_cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True )
203
+ lora_merge_p = subprocess .run (
204
+ lora_merge_cmd , stdout = subprocess .PIPE , stderr = subprocess .STDOUT , text = True , timeout = 150
205
+ )
204
206
self .sfttrain_tester .assert_result (lora_merge_p .returncode , lora_merge_p .stdout )
205
207
206
208
# test lora_merge_model generate
0 commit comments