From 751646a6c0014e1e808b3519cab59372ed23a5a3 Mon Sep 17 00:00:00 2001 From: Chaichontat Sriworarat Date: Tue, 5 Mar 2024 10:33:15 -0500 Subject: [PATCH] Fix generator init --- main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 5b3467b..96541ba 100644 --- a/main.py +++ b/main.py @@ -41,17 +41,21 @@ def main(path: Path, tobench: list[str], epochs: int, output: str): }.items() } logger.info("Initializing") + benches = {} for name, path in paths.items(): - benches[name] = benchmark(path, name.split("_")[0], False, "sp" in name) + benches[name] = benchmark( + path, name.split("_")[0], random=False, sparse="sp" in name + ) next(benches[name]) + try: - benches[name + "_rand"] = benchmark( - path, name.split("_")[0], True, "sp" in name - ) + b = benchmark(path, name.split("_")[0], random=True, sparse="sp" in name) next(benches[name + "_rand"]) + benches[name + "_rand"] = b except ValueError: ... + logger.info("Initialized " + name) if tobench and "all" not in tobench: benches = {k: v for k, v in benches.items() if k in tobench}