Download benchmark/execution_order.py from MaduRox/Kalpana-Multi-Model-Benchmark: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/spaces/MaduRox/Kalpana-Multi-Model-Benchmark/resolve/main/benchmark/execution_order.py
- Command line
-
hf download hf://spaces/MaduRox/Kalpana-Multi-Model-Benchmark/benchmark/execution_order.py
-
curl -L -o execution_order.py https://huggingface.co/spaces/MaduRox/Kalpana-Multi-Model-Benchmark/resolve/main/benchmark/execution_order.py
586 Bytes
| import random | |
| from typing import List, Tuple | |
| def generate_execution_order(num_questions: int, seed: int = 42) -> List[Tuple[str, str]]: | |
| """ | |
| Generates a repeatable list of execution tuples, deciding which endpoint | |
| to call first for each question. | |
| Returns list of ("plain" first, "rif" second) or ("rif" first, "plain" second). | |
| """ | |
| rng = random.Random(seed) | |
| order = [] | |
| for _ in range(num_questions): | |
| if rng.choice([True, False]): | |
| order.append(("plain", "rif")) | |
| else: | |
| order.append(("rif", "plain")) | |
| return order | |