Format GPU configuration for display.
(self, gpu_config)
| 549 | print(format_table(rows, headers)) |
| 550 | |
| 551 | def _format_gpu_info(self, gpu_config): |
| 552 | """Format GPU configuration for display.""" |
| 553 | if not gpu_config: |
| 554 | return "-" |
| 555 | |
| 556 | attach_mode = gpu_config.get("attach_mode", "") |
| 557 | gpus = gpu_config.get("gpus", []) |
| 558 | |
| 559 | if attach_mode == "all": |
| 560 | return "All GPUs" |
| 561 | elif attach_mode == "listed" and gpus: |
| 562 | gpu_slots = [gpu.get("slot", "Unknown") for gpu in gpus] |
| 563 | return ", ".join(gpu_slots) |
| 564 | else: |
| 565 | return "-" |
| 566 | |
| 567 | def start_vm(self, vm_id: str) -> None: |
| 568 | """Start a VM.""" |