MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / TaskWrapper

Class TaskWrapper

trinity/explorer/scheduler.py:21–36  ·  view source on GitHub ↗

A wrapper for a task. Each task can run multiple times (repeat_times) on same or different runners.

Source from the content-addressed store, hash-verified

19
20@dataclass
21class TaskWrapper:
22 """A wrapper for a task.
23 Each task can run multiple times (repeat_times) on same or different runners.
24 """
25
26 task: Task
27 batch_id: Union[int, str]
28 sub_task_num: int = 1 # number of sub tasks splitted from this task
29 # if max_repeat_times_per_runner is set, one task may be splitted into multiple sub tasks
30 finished_sub_task_num: int = 0
31 completed_runs: int = 0
32 total_runs: int = 0 # total planned runs for the whole task
33 metrics: List[Dict[str, float]] = field(default_factory=list)
34 experience_payloads: List[bytes] = field(default_factory=list)
35 first_error: Optional[str] = None
36 emitted: bool = False
37
38
39@dataclass(frozen=True)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected