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

Method write

trinity/buffer/storage/sql.py:352–361  ·  view source on GitHub ↗
(self, data: List[Dict])

Source from the content-addressed store, hash-verified

350 self.logger.info(f"SQL task storage initialized at {self.config.path}")
351
352 async def write(self, data: List[Dict]) -> None:
353 await self.prepare()
354
355 async def operation(session: AsyncSession):
356 tasks = [self.table_model_cls.from_dict(item) for item in data]
357 session.add_all(tasks)
358
359 await async_run_with_retry_session(
360 self.session, operation, self.max_retry_times, self.max_retry_interval
361 )
362
363 async def read(self, batch_size: Optional[int] = None) -> List[Task]:
364 await self.prepare()

Callers 3

load_from_datasetMethod · 0.45
load_from_datasetMethod · 0.45

Calls 2

prepareMethod · 0.95

Tested by 1