From 34f8dea2611580017706b1a1ff01b7472c86d895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20Qui=C3=B1anola?= Date: Mon, 29 Jun 2026 00:03:00 -0700 Subject: [PATCH] fix(examples): repair datacenters SDK drift DataCenter.US_GA_2 was removed from the runpod_flash DataCenter enum, so 04_scaling_performance/02_datacenters/gpu_worker.py raised AttributeError: US_GA_2 on import and flash dev failed to load it. - Use US_KS_2 for the single-DC and multi-DC examples. - Prune data centers no longer in the enum (US-GA-2, US-MD-1, US-NC-1, EUR-IS-1) from the README table so it matches the SDK. --- 04_scaling_performance/02_datacenters/README.md | 8 ++------ 04_scaling_performance/02_datacenters/gpu_worker.py | 10 +++++----- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/04_scaling_performance/02_datacenters/README.md b/04_scaling_performance/02_datacenters/README.md index 8029c02..33d7eab 100644 --- a/04_scaling_performance/02_datacenters/README.md +++ b/04_scaling_performance/02_datacenters/README.md @@ -24,19 +24,15 @@ flash dev | ID | Location | |----|----------| | `US-CA-2` | US - California | -| `US-GA-2` | US - Georgia | | `US-IL-1` | US - Illinois | | `US-KS-2` | US - Kansas | -| `US-MD-1` | US - Maryland | | `US-MO-1` | US - Missouri | | `US-MO-2` | US - Missouri | -| `US-NC-1` | US - North Carolina | | `US-NC-2` | US - North Carolina | | `US-NE-1` | US - Nebraska | | `US-WA-1` | US - Washington | | `EU-CZ-1` | Europe - Czech Republic | | `EU-RO-1` | Europe - Romania | -| `EUR-IS-1` | Europe - Iceland | | `EUR-NO-1` | Europe - Norway | CPU endpoints support: `EU-RO-1`. @@ -46,7 +42,7 @@ CPU endpoints support: `EU-RO-1`. **Single datacenter:** ```python -@Endpoint(name="us-worker", gpu=GpuGroup.ANY, datacenter=DataCenter.US_GA_2) +@Endpoint(name="us-worker", gpu=GpuGroup.ANY, datacenter=DataCenter.US_KS_2) async def inference(data: dict) -> dict: ... ``` @@ -57,7 +53,7 @@ async def inference(data: dict) -> dict: @Endpoint( name="global-worker", gpu=GpuGroup.ANY, - datacenter=[DataCenter.US_GA_2, DataCenter.EU_RO_1], + datacenter=[DataCenter.US_KS_2, DataCenter.EU_RO_1], ) async def inference(data: dict) -> dict: ... diff --git a/04_scaling_performance/02_datacenters/gpu_worker.py b/04_scaling_performance/02_datacenters/gpu_worker.py index bfa70a5..98fdcea 100644 --- a/04_scaling_performance/02_datacenters/gpu_worker.py +++ b/04_scaling_performance/02_datacenters/gpu_worker.py @@ -8,11 +8,11 @@ name="04_02_gpu_us", gpu=GpuGroup.ANY, workers=(0, 3), - datacenter=DataCenter.US_GA_2, + datacenter=DataCenter.US_KS_2, ) async def us_inference(payload: dict) -> dict: - """GPU inference pinned to US-GA-2.""" - return {"datacenter": "US-GA-2", "result": payload} + """GPU inference pinned to US-KS-2.""" + return {"datacenter": "US-KS-2", "result": payload} # deploy across multiple datacenters for broader availability @@ -20,10 +20,10 @@ async def us_inference(payload: dict) -> dict: name="04_02_gpu_multi", gpu=GpuGroup.ANY, workers=(0, 3), - datacenter=[DataCenter.US_GA_2, DataCenter.EU_RO_1], + datacenter=[DataCenter.US_KS_2, DataCenter.EU_RO_1], ) async def multi_dc_inference(payload: dict) -> dict: - """GPU inference available in US-GA-2 and EU-RO-1.""" + """GPU inference available in US-KS-2 and EU-RO-1.""" return {"result": payload}