|
134 | 134 | - name: Use endpoint model if test_model not provided or set to auto-detect |
135 | 135 | ansible.builtin.set_fact: |
136 | 136 | test_model: "{{ endpoint_model }}" |
| 137 | + actual_model: "{{ endpoint_model }}" |
137 | 138 | cacheable: true |
138 | 139 | when: test_model is not defined or test_model == '__AUTO_DETECT__' |
139 | 140 |
|
| 141 | + - name: Set actual_model to test_model if explicitly provided |
| 142 | + ansible.builtin.set_fact: |
| 143 | + actual_model: "{{ test_model }}" |
| 144 | + cacheable: true |
| 145 | + when: test_model is defined and test_model != '__AUTO_DETECT__' |
| 146 | + |
140 | 147 | - name: Validate test_model matches endpoint if provided |
141 | 148 | ansible.builtin.assert: |
142 | 149 | that: |
|
151 | 158 |
|
152 | 159 | - name: Display model source |
153 | 160 | ansible.builtin.debug: |
154 | | - msg: "Detected model from endpoint: {{ test_model }}" |
| 161 | + msg: "Detected model from endpoint: {{ actual_model }}" |
| 162 | + |
| 163 | + - name: Set actual_model for managed mode |
| 164 | + ansible.builtin.set_fact: |
| 165 | + actual_model: "{{ test_model }}" |
| 166 | + when: vllm_mode == 'managed' |
155 | 167 |
|
156 | 168 | - name: Display auto-config test information |
157 | 169 | ansible.builtin.debug: |
|
160 | 172 | - "Auto-Configured LLM Test" |
161 | 173 | - "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" |
162 | 174 | - "Test Run ID: {{ test_run_id }}" |
163 | | - - "Model: {{ test_model }}{{ ' (detected from endpoint)' if (vllm_mode == 'external' and test_model is defined) else '' }}" |
| 175 | + - "Model: {{ actual_model }}{{ ' (detected from endpoint)' if vllm_mode == 'external' else '' }}" |
164 | 176 | - "Workload: {{ workload_type }}" |
165 | 177 | - "Requested Cores: {{ requested_cores }}" |
166 | 178 | - "DUT: {{ groups['dut'][0] }} ({{ hostvars[groups['dut'][0]]['ansible_host'] }})" |
|
322 | 334 | become: true |
323 | 335 | vars: |
324 | 336 | test_run_id: "{{ hostvars['localhost']['test_run_id'] }}" |
325 | | - test_model: "{{ hostvars['localhost']['test_model'] }}" |
| 337 | + actual_model: "{{ hostvars['localhost']['actual_model'] }}" |
326 | 338 | core_configuration: "{{ hostvars['localhost']['core_configuration'] }}" |
327 | 339 |
|
328 | 340 | roles: |
|
339 | 351 | gather_facts: false |
340 | 352 | vars: |
341 | 353 | test_run_id: "{{ hostvars['localhost']['test_run_id'] }}" |
342 | | - test_model: "{{ hostvars['localhost']['test_model'] }}" |
| 354 | + actual_model: "{{ hostvars['localhost']['actual_model'] }}" |
343 | 355 | core_configuration: "{{ hostvars['localhost']['core_configuration'] }}" |
344 | 356 |
|
345 | 357 | tasks: |
|
356 | 368 | "tensor_parallel": {{ core_configuration.tensor_parallel }}, |
357 | 369 | "omp_num_threads": {{ core_configuration.omp_num_threads | default('null') }}, |
358 | 370 | "omp_threads_bind": {{ core_configuration.omp_threads_bind | default('null') }}, |
359 | | - "model": "{{ test_model }}", |
| 371 | + "model": "{{ actual_model }}", |
360 | 372 | "model_source": "{{ 'auto-detected' if hostvars['localhost']['vllm_mode'] == 'external' else 'specified' }}", |
361 | 373 | "workload": "{{ workload_type }}", |
362 | 374 | "vllm_mode": "{{ hostvars['localhost']['vllm_mode'] }}", |
|
365 | 377 | "test_duration": "{{ test_duration_string | default('unknown') }}", |
366 | 378 | "test_duration_seconds": {{ test_duration_seconds | default('null') }} |
367 | 379 | } |
368 | | - dest: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/test-metadata.json" |
| 380 | + dest: "{{ bench_config.results_dir }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/test-metadata.json" |
369 | 381 |
|
370 | 382 | # Skip result fetching when running as part of a core sweep |
371 | 383 | # The collect-sweep-results.yml playbook will fetch all results at once |
372 | 384 | - name: Ensure local results directory exists |
373 | 385 | ansible.builtin.file: |
374 | | - path: "{{ hostvars['localhost']['local_results_base'] }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}" |
| 386 | + path: "{{ hostvars['localhost']['local_results_base'] }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}" |
375 | 387 | state: directory |
376 | 388 | mode: "0755" |
377 | 389 | delegate_to: localhost |
378 | 390 | when: is_core_sweep is not defined or not is_core_sweep |
379 | 391 |
|
380 | 392 | - name: Fetch results to local machine |
381 | 393 | ansible.posix.synchronize: |
382 | | - src: "{{ bench_config.results_dir }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
383 | | - dest: "{{ hostvars['localhost']['local_results_base'] }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
| 394 | + src: "{{ bench_config.results_dir }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
| 395 | + dest: "{{ hostvars['localhost']['local_results_base'] }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
384 | 396 | mode: pull |
385 | 397 | recursive: true |
386 | 398 | when: is_core_sweep is not defined or not is_core_sweep |
|
392 | 404 | ansible.builtin.command: |
393 | 405 | cmd: >- |
394 | 406 | python3 {{ playbook_dir }}/scripts/extract_benchmark_timings.py |
395 | | - {{ hostvars['localhost']['local_results_base'] }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/benchmarks.json |
396 | | - {{ hostvars['localhost']['local_results_base'] }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/test-metadata.json |
| 407 | + {{ hostvars['localhost']['local_results_base'] }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/benchmarks.json |
| 408 | + {{ hostvars['localhost']['local_results_base'] }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/test-metadata.json |
397 | 409 | delegate_to: localhost |
398 | 410 | register: timing_extraction |
399 | 411 | changed_when: false |
|
416 | 428 | - "Configuration: {{ core_configuration.name }}" |
417 | 429 | - " CPUs: {{ core_configuration.cpuset_cpus }}" |
418 | 430 | - " NUMA: {{ core_configuration.cpuset_mems }}" |
419 | | - - "Results: {{ '~/benchmark-results' if hostvars['localhost']['is_awx_job'] else 'results/llm' }}/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/" |
| 431 | + - "Results: {{ '~/benchmark-results' if hostvars['localhost']['is_awx_job'] else 'results/llm' }}/{{ actual_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/" |
420 | 432 | - "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" |
421 | 433 | when: is_core_sweep is not defined or not is_core_sweep |
422 | 434 |
|
|
455 | 467 | roles: |
456 | 468 | - role: results_collector |
457 | 469 | vars: |
458 | | - log_collection_dest: "{{ playbook_dir }}/../../../results/llm/{{ test_model | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
| 470 | + log_collection_dest: "{{ playbook_dir }}/../../../results/llm/{{ hostvars['localhost']['actual_model'] | replace('/', '__') }}/{{ workload_type }}-{{ test_run_id }}/{{ core_configuration.name }}/" |
459 | 471 | journald_identifier: "vllm-{{ workload_type }}-{{ core_configuration.cores }}c-tp{{ core_configuration.tensor_parallel }}" |
460 | 472 | log_filename_prefix: "vllm-server" |
461 | 473 | journald_time_range: "1 hour ago" |
|
0 commit comments