File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
12"""Minimal CLI coverage for teacher_model."""
23
34from unittest .mock import patch
@@ -16,7 +17,8 @@ def test_run_help_explains_conditional_function_requirements():
1617 assert result .exit_code == 0
1718 assert "--teacher-model" in help_text
1819 assert (
19- "1. Configuration-driven: Use -c/--config to specify a YAML file" in help_text
20+ "1. Configuration-driven: Use -c/--config to specify a YAML file"
21+ in help_text
2022 )
2123 assert (
2224 "2. Direct parameter: Provide all required arguments via CLI options"
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
12"""Minimal OPD contract tests."""
3+ # pylint: disable=redefined-outer-name # pytest fixture 标准用法
24
35from pathlib import Path
46from unittest .mock import AsyncMock , MagicMock , patch
@@ -165,7 +167,9 @@ async def test_opd_example_uploads_local_datasets(rl_client):
165167
166168 with patch (
167169 "dashscope.finetune.reinforcement.common.model.to_bailian_data" ,
168- new = AsyncMock (side_effect = [["file-train-001" ], ["file-validation-001" ]]),
170+ new = AsyncMock (
171+ side_effect = [["file-train-001" ], ["file-validation-001" ]]
172+ ),
169173 ):
170174 train_ids , validation_ids = await rl_client .upload_datasets ()
171175
@@ -186,7 +190,10 @@ def test_regular_rl_example_keeps_resources_and_rl_hyperparameters(rl_client):
186190 assert rl_client .tuning .teacher_model is None
187191 assert rl_client .tuning .training .type == TrainingType .TRAINING_TYPE
188192 assert rl_client .tuning .training .hyper_parameters ["algorithm" ] == "gspo"
189- assert rl_client .tuning .training .hyper_parameters ["lr_scheduler_type" ] == "linear"
193+ assert (
194+ rl_client .tuning .training .hyper_parameters ["lr_scheduler_type" ]
195+ == "linear"
196+ )
190197 assert rl_client .tuning .training .resources == {
191198 "charge_type" : "mtu_postpaid" ,
192199 "mtu_spec_code" : "MTU4" ,
You can’t perform that action at this time.
0 commit comments