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

Method __init__

trinity/buffer/task_scheduler.py:60–74  ·  view source on GitHub ↗
(self, explorer_state: Dict, config: Config)

Source from the content-addressed store, hash-verified

58 """
59
60 def __init__(self, explorer_state: Dict, config: Config):
61 super().__init__(explorer_state, config)
62 if "latest_task_index" in self.explorer_state:
63 self.explorer_state["taskset_states"] = [
64 {
65 "current_index": explorer_state["latest_task_index"],
66 }
67 ]
68 index = self.explorer_state.get("taskset_states", [{"current_index": 0}])[0].get(
69 "current_index", 0
70 )
71 taskset_config = deepcopy(self.config.buffer.explorer_input.tasksets[0])
72 taskset_config.index = index
73 taskset_config.data_selector = None # disable selection
74 self.reader = get_buffer_reader(taskset_config)
75
76 async def read(self) -> List:
77 return await self.reader.read()

Callers

nothing calls this directly

Calls 3

get_buffer_readerFunction · 0.90
__init__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected