MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / __init__

Method __init__

AgentBench.old/src/tasks/dbbench/__init__.py:125–135  ·  view source on GitHub ↗
(self, **configs)

Source from the content-addressed store, hash-verified

123
124class DBBench(Task[Dict, Dict[str, Any], str]):
125 def __init__(self, **configs):
126 super().__init__(**configs)
127 self.data_file = configs.pop("data_file")
128 self.max_round = configs.pop("max_round", 5)
129 self.processes = []
130 ctx = mp.get_context('spawn')
131 for i in range(self.workers):
132 receiver, sender = ctx.Pipe(False)
133 p = ctx.Process(target=process, args=(receiver, self.max_round))
134 p.start()
135 self.processes.append((sender, ctx.Lock(), p))
136
137 def escape(self, string: str, conn=None):
138 conn = conn or self.conn

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected