| 159 | |
| 160 | |
| 161 | def generate_condition_entry( |
| 162 | gpu_name: str, num_gpus: int, config_name: str, server_names: list |
| 163 | ) -> dict: |
| 164 | # using copy.deepcopy to avoid creating YAML anchors |
| 165 | wildcards = copy.deepcopy(GPU_WILDCARDS[gpu_name]) |
| 166 | condition = { |
| 167 | "wildcards": wildcards, |
| 168 | "ranges": {"system_gpu_count": {"gte": num_gpus}}, |
| 169 | } |
| 170 | |
| 171 | tests = [ |
| 172 | f"perf/test_perf_sanity.py::test_e2e[aggr_upload-{config_name}-{name}]" |
| 173 | for name in server_names |
| 174 | ] |
| 175 | return {"condition": condition, "tests": tests} |
| 176 | |
| 177 | |
| 178 | def generate_tests(test_list_path: Path = TEST_LIST_PATH, test_config_dir: Path = PERF_SANITY_DIR): |