MaduRox's picture
Upload folder using huggingface_hub
e3584eb verified
Raw
History Blame Contribute Delete
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