MCPcopy Create free account
hub / github.com/Robbyant/lingbot-map / write_rows

Function write_rows

scripts/benchmark_gct_memory.py:259–278  ·  view source on GitHub ↗
(path: Path, rows: Iterable[dict])

Source from the content-addressed store, hash-verified

257
258
259def write_rows(path: Path, rows: Iterable[dict]) -> None:
260 fieldnames = [
261 "frames",
262 "status",
263 "requested_height",
264 "requested_width",
265 "effective_height",
266 "effective_width",
267 "backend",
268 "dtype",
269 "seconds",
270 "peak_allocated_gib",
271 "peak_reserved_gib",
272 "error",
273 ]
274 path.parent.mkdir(parents=True, exist_ok=True)
275 with path.open("w", newline="") as f:
276 writer = csv.DictWriter(f, fieldnames=fieldnames)
277 writer.writeheader()
278 writer.writerows(rows)
279
280
281def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected