(self, dataset: str, model: str, start: int = 0, end: int = -1, mode: str = "atom", max_concurrent: int = 10)
| 51 | |
| 52 | class ExperimentRunner: |
| 53 | def __init__(self, dataset: str, model: str, start: int = 0, end: int = -1, mode: str = "atom", max_concurrent: int = 10): |
| 54 | # Initialize experiment runner |
| 55 | self.dataset = dataset |
| 56 | self.start = start |
| 57 | self.end = None if end == -1 else end |
| 58 | self.interval = "full" if self.end is None else f"{start}-{end}" |
| 59 | self.timestamp = time.time() |
| 60 | self.mode = mode |
| 61 | self.max_concurrent = max_concurrent # Maximum concurrent tasks |
| 62 | # Validate dataset support |
| 63 | if dataset not in DATASET_CONFIGS: |
| 64 | raise ValueError(f"Unsupported dataset: {dataset}") |
| 65 | |
| 66 | self.config = DATASET_CONFIGS[dataset] |
| 67 | set_model(model) |
| 68 | |
| 69 | async def gather_results(self, testset: List[Dict[str, Any]]) -> List[Any]: |
| 70 | # Collect experiment results with concurrency limit |
nothing calls this directly
no test coverage detected