MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / main

Function main

experiments/benchmark_TTFT.py:144–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 json.dump(by_agent, f, ensure_ascii=False, indent=2)
143
144async def main():
145 args = parse_args()
146 output_dir = Path(args.output_dir).expanduser()
147 output_dir.mkdir(parents=True, exist_ok=True)
148 agent_names = [name for name, num in zip(args.agent_names, args.agent_nums) for _ in range(num)]
149 kwargs = get_kwargs(args.mode, len(agent_names))
150 kv_config = KVCommConfig.from_env().apply_overrides(
151 threshold=args.kv_threshold,
152 max_anchor_num=args.kv_max_anchor_num,
153 window_size=args.kv_window_size,
154 thread_pool_workers=args.kv_thread_workers,
155 worker_timeout=args.kv_worker_timeout,
156 )
157
158 graph = Graph(
159 domain=args.domain,
160 llm_name=args.llm_name,
161 agent_names=agent_names,
162 kv_config=kv_config,
163 **kwargs,
164 )
165
166 eval_kwargs = {
167 "prefix": args.prefix,
168 "output_dir": str(output_dir),
169 }
170
171 configure_logging(log_path=output_dir / "logs/log.txt")
172 _ = await evaluate(
173 graph=graph,
174 mode=args.execution_mode,
175 samples=args.samples,
176 **eval_kwargs,
177 )
178
179
180def get_kwargs(

Callers 1

benchmark_TTFT.pyFile · 0.70

Calls 7

GraphClass · 0.90
configure_loggingFunction · 0.90
apply_overridesMethod · 0.80
from_envMethod · 0.80
parse_argsFunction · 0.70
get_kwargsFunction · 0.70
evaluateFunction · 0.70

Tested by

no test coverage detected