Databricks AI Runtime SDK replaces serverless_gpu
The Databricks AI Runtime SDK replaces the deprecated serverless_gpu package in GPU environment version 6 and above, introducing new APIs for distributed training.
O que mudou
Use cases
Imagine you need to train machine learning models using multiple GPUs in a notebook without managing Spark clusters. With the Databricks AI Runtime SDK, you can:
- Use the
@distributeddecorator to run distributed training across all GPUs on the node. - Integrate with PyTorch DDP, FSDP, and DeepSpeed.
- Automatically track metrics in MLflow.
How to use
Import the decorator and apply it to your training function:
from databricks.air import distributed
@distributed()
def train():
import os
import torch
import torch.distributed as dist
local_rank = int(os.environ["LOCAL_RANK"])
torch.cuda.set_device(local_rank)
device = torch.device(f"cuda:{local_rank}")
dist.init_process_group("nccl")
# ... your training code here ...
dist.destroy_process_group()
train.distributed()
What happens in this code:
- The function is decorated for distributed execution.
- The process is bound to its respective GPU using the
LOCAL_RANKenvironment variable. - The NCCL process group is initialized for communication between GPUs.
- The
.distributed()method is called to trigger parallel execution.
Limitations and requirements
- This feature is in Beta.
- Available in GPU environment version 6 and above.
- Supports only a single node per decorator execution.
- The default execution timeout is 3 hours.
- ai runtime
- distributed training
- pytorch
- mlflow
- gpus
Databricks AI Runtime SDK replaces serverless_gpu
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- DatabricksGA
Repositórios de pacotes em nível de workspace para Databricks Apps
Administradores de workspace podem configurar repositórios padrão de pacotes Python e npm para Databricks Apps.
databricks apps · workspace settings - DatabricksGA
Redimensione partições de stateful streaming sem perder o checkpoint no Databricks
Agora é possível alterar o número de partições de shuffle em queries Structured Streaming e pipelines Lakeflow sem descartar o estado do checkpoint.
structured streaming · lakeflow - DatabricksAtualização
Google Gemini 4 Argon disponível no Unity Gateway do Databricks
O modelo multimodal Google Gemini 4 Argon já pode ser acessado via Foundation Model APIs e Unity Gateway.
unity catalog · foundation model apis