From d16c07eccc49f45f9d9b8ab780f47310270691c7 Mon Sep 17 00:00:00 2001 From: Andrey Cheptsov Date: Wed, 25 Mar 2026 22:13:14 +0100 Subject: [PATCH] Fix verda tests for verda>=1.22.0 InstanceType changes verda 1.22.0 added 8 new required fields to InstanceType (best_for, model, name, p2p, currency, manufacturer, display_name, supported_os). Update test fixtures with real API values and the instance_types() helper to include them, and pin verda>=1.22.0. Co-Authored-By: Claude Opus 4.6 (1M context) --- pyproject.toml | 4 +-- src/tests/providers/test_verda.py | 53 ++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 72c2c43..ff10980 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,10 @@ oci = [ "pydantic>=1.10.10,<2.0.0", ] verda = [ - 'verda', + 'verda>=1.22.0', ] maybe_verda = [ - 'verda; python_version>="3.10"', + 'verda>=1.22.0; python_version>="3.10"', ] all = ["gpuhunt[aws,azure,maybe_verda,gcp,maybe_nebius,oci]"] dev = [ diff --git a/src/tests/providers/test_verda.py b/src/tests/providers/test_verda.py index 75b204e..1203a0f 100644 --- a/src/tests/providers/test_verda.py +++ b/src/tests/providers/test_verda.py @@ -17,85 +17,91 @@ def raw_instance_types() -> list[dict]: # verda.instance_types.get() one_gpu = { - "best_for": [ - "Gargantuan ML models", - "Multi-GPU training", - "FP64 HPC", - "NVLINK", - ], + "best_for": [], "cpu": {"description": "30 CPU", "number_of_cores": 30}, + "currency": "usd", "deploy_warning": "H100: Use Nvidia driver 535 or higher for best performance", "description": "Dedicated Hardware Instance", + "display_name": None, "gpu": {"description": "1x H100 SXM5 80GB", "number_of_gpus": 1}, "gpu_memory": {"description": "80GB GPU RAM", "size_in_gigabytes": 80}, "id": "c01dd00d-0000-480b-ae4e-d429115d055b", "instance_type": "1H100.80S.30V", + "manufacturer": "NVIDIA", "memory": {"description": "120GB RAM", "size_in_gigabytes": 120}, - "model": "H100 80GB", + "model": "H100", "name": "H100 SXM5 80GB", - "p2p": "", + "p2p": None, "price_per_hour": "3.95", "spot_price": "1.70", "storage": {"description": "dynamic"}, + "supported_os": ["ubuntu-22.04", "ubuntu-24.04"], } two_gpu = { - "best_for": ["Large ML models", "FP32 calculations", "Single-GPU training"], + "best_for": [], "cpu": {"description": "20 CPU", "number_of_cores": 20}, + "currency": "usd", "deploy_warning": None, "description": "Dedicated Hardware Instance", + "display_name": None, "gpu": {"description": "2x RTX A6000 48GB", "number_of_gpus": 2}, "gpu_memory": {"description": "96GB GPU RAM", "size_in_gigabytes": 96}, "id": "07cf5dc1-a5d2-4972-ae4e-d429115d055b", "instance_type": "2A6000.20V", + "manufacturer": "NVIDIA", "memory": {"description": "120GB RAM", "size_in_gigabytes": 120}, "model": "RTX A6000", "name": "RTX A6000 48GB", - "p2p": "", + "p2p": "50GB/s", "price_per_hour": "1.98", "spot_price": "0.70", "storage": {"description": "dynamic"}, + "supported_os": ["ubuntu-22.04", "ubuntu-24.04"], } cpu_instance = { - "best_for": ["Running services", "API server", "Data transfers"], + "best_for": [], "cpu": {"description": "120 CPU", "number_of_cores": 120}, + "currency": "usd", "deploy_warning": None, "description": "Dedicated Hardware Instance", + "display_name": "Rome/Milan", "gpu": {"description": "", "number_of_gpus": 0}, "gpu_memory": {"description": "", "size_in_gigabytes": 0}, "id": "ccc00007-a5d2-4972-ae4e-d429115d055b", "instance_type": "CPU.120V.480G", + "manufacturer": "AMD", "memory": {"description": "480GB RAM", "size_in_gigabytes": 480}, "model": "CPU Node", "name": "AMD EPYC", - "p2p": "", + "p2p": None, "price_per_hour": "3.00", "spot_price": "1.50", "storage": {"description": "dynamic"}, + "supported_os": ["ubuntu-22.04", "ubuntu-24.04"], } minimal = { - "best_for": [ - "Small ML models", - "Multi-GPU training", - "FP64 calculations", - "NVLINK", - ], + "best_for": [], "cpu": {"description": "6 CPU", "number_of_cores": 6}, + "currency": "usd", "deploy_warning": None, "description": "Dedicated Hardware Instance", + "display_name": None, "gpu": {"description": "1x Tesla V100 16GB", "number_of_gpus": 1}, "gpu_memory": {"description": "16GB GPU RAM", "size_in_gigabytes": 16}, "id": "04cf5dc1-a5d2-4972-ae4e-d429115d055b", "instance_type": "1V100.6V", + "manufacturer": "NVIDIA", "memory": {"description": "23GB RAM", "size_in_gigabytes": 23}, "model": "Tesla V100", "name": "Tesla V100 16GB", - "p2p": "", + "p2p": None, "price_per_hour": "0.89", "spot_price": "0.25", "storage": {"description": "225GB NVME", "size_in_gigabytes": 225}, + "supported_os": ["ubuntu-22.04", "ubuntu-24.04"], } return [one_gpu, two_gpu, cpu_instance, minimal] @@ -162,6 +168,15 @@ def instance_types(raw_instance_type: dict) -> InstanceType: memory=raw_instance_type["memory"], gpu_memory=raw_instance_type["gpu_memory"], storage=raw_instance_type["storage"], + best_for=raw_instance_type["best_for"], + model=raw_instance_type["model"], + name=raw_instance_type["name"], + p2p=raw_instance_type["p2p"], + currency=raw_instance_type["currency"], + manufacturer=raw_instance_type["manufacturer"], + display_name=raw_instance_type["display_name"], + supported_os=raw_instance_type["supported_os"], + deploy_warning=raw_instance_type.get("deploy_warning"), ) return instance