serverless_gpu.launcher
Main launcher module for distributed serverless GPU compute.
This module provides the core functionality for launching and managing distributed functions on serverless GPU infrastructure. It includes:
The distributed decorator for executing functions on remote GPU resources
Job submission and monitoring capabilities
Integration with Databricks jobs API and MLflow for tracking
Environment synchronization and dependency management
Support for multi-GPU and multi-node distributed workloads
The main entry point is the distributed function which can be used as a decorator or called directly to execute functions on serverless GPU compute resources.
Functions
|
Decorator to launch a function on remote GPUs or local GPUs. |
Classes
|
- serverless_gpu.launcher.distributed(gpus, gpu_type=None, remote=False, run_async=False)[source]
Decorator to launch a function on remote GPUs or local GPUs.
remote GPUs: gpus that are not attached to your notebook but you have access to local GPUs: the gpus that are attached to the notebook
- Parameters
gpus (int, optional) – Number of GPUs to use. Must be 1, 2, 4, 8 or a multiple of 8 for remote GPUs.
gpu_type (Optional[Union[GPUType, str]], optional) – The GPU type to use. Defaults to None. Required if remote is True.
remote (bool) – Whether to run the function on remote GPUs. Defaults to False.
run_async (bool) – Whether to run the function asynchronously. Defaults to False.