Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions 04_scaling_performance/02_datacenters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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:
...
```
Expand All @@ -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:
...
Expand Down
10 changes: 5 additions & 5 deletions 04_scaling_performance/02_datacenters/gpu_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
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
@Endpoint(
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}


Expand Down
Loading