Skip to content

Commit 6a4cb56

Browse files
author
luk384090-cloud
committed
refactor(agentic_rl): refactor CLI interface return type and add V2 implementation
- Change CLI interface return type from FineTune to SubmitResult - Add dashscope/v2/finetune/agentic_rl.py module with V2 implementation - Unify SubmitResult type usage in V2 implementation replacing FineTune data class - Update function signatures to match new return type definitions - Fix instance creation in test code to adapt to new inheritance structure
1 parent 3bb6419 commit 6a4cb56

4 files changed

Lines changed: 751 additions & 4 deletions

File tree

‎dashscope/cli/agentic_rl.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717
from rich.progress import Progress, SpinnerColumn, TextColumn
1818
from rich.table import Table
1919

20-
from dashscope.finetune.agentic_rl import AgenticRL
20+
from dashscope.finetune.agentic_rl import AgenticRL, SubmitResult
2121
from dashscope.finetune.reinforcement import (
2222
serialize_for_output,
2323
FunctionType,
2424
)
2525
from dashscope.finetune.reinforcement.common.errors import OutputError
26-
from dashscope.finetune.customize_types import FineTune
2726
from dashscope.cli.common import error, normalize_local_path_or_url
2827

2928

@@ -427,7 +426,7 @@ async def _run_workflow_async(
427426
config_path: Optional[str],
428427
api_key: Optional[str],
429428
run_kwargs: Dict[str, Any],
430-
) -> FineTune:
429+
) -> SubmitResult:
431430
"""
432431
Execute the RL tuning workflow asynchronously.
433432

‎dashscope/finetune/agentic_rl.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AgenticRL(_AgenticRLBase):
9090
copies of every job verb.
9191
"""
9292

93-
def submit_job(
93+
def submit_job( # type: ignore[override]
9494
self,
9595
model: Optional[str] = None,
9696
datasets: Optional[List[Dataset]] = None,

0 commit comments

Comments
 (0)