Implementation:Interpretml Interpret Powerlift AzureVMInstance: Difference between revisions
Auto-imported from implementations/Interpretml_Interpret_Powerlift_AzureVMInstance.md |
Sync from local file |
||
| Line 161: | Line 161: | ||
== Related Pages == | == Related Pages == | ||
* [[Interpretml_Interpret_Powerlift_Executor]] -- Abstract base class that AzureVMInstance extends | * [[Implementation:Interpretml_Interpret_Powerlift_Executor]] -- Abstract base class that AzureVMInstance extends | ||
* [[Interpretml_Interpret_Powerlift_RunAzureVM]] -- The remote process runner that this executor delegates to | * [[Implementation:Interpretml_Interpret_Powerlift_RunAzureVM]] -- The remote process runner that this executor delegates to | ||
* [[Interpretml_Interpret_Powerlift_AzureContainerInstance]] -- Lighter-weight alternative using Azure Container Instances | * [[Implementation:Interpretml_Interpret_Powerlift_AzureContainerInstance]] -- Lighter-weight alternative using Azure Container Instances | ||
* [[Interpretml_Interpret_Powerlift_Schema]] -- Database schema models used by the Store | * [[Implementation:Interpretml_Interpret_Powerlift_Schema]] -- Database schema models used by the Store | ||
[[Category:Implementations]] | [[Category:Implementations]] | ||
[[Category:Implementations]] | [[Category:Implementations]] | ||
Latest revision as of 10:42, 27 September 2026
| Knowledge Sources | |
|---|---|
| Domains | Benchmarking, Cloud_Infrastructure, Azure |
| Last Updated | 2026-02-07 12:00 GMT |
Overview
Azure VM executor that runs Powerlift benchmark trials on provisioned Azure Virtual Machines, supporting configurable VM sizes, OS images, and disk types for GPU and high-performance workloads.
Description
The AzureVMInstance class extends the Executor base class to provision and manage Azure Virtual Machines for running benchmark trials. Unlike the container-based executor, this allows full VM customization including:
- VM sizing -- Configurable VM size (default:
Standard_B16s_v2), with GPU support via sizes likeStandard_NC24ads_A100_v4. - OS image configuration -- Customizable image publisher, offer, SKU, and version (defaults to Ubuntu 24.04 LTS).
- Disk type -- Choice between standard and premium storage (e.g.,
Standard_LRSorPremium_LRSfor SSDs). - Location selection -- Optional Azure region specification; defaults to the resource group's location.
- Asynchronous execution -- Uses
multiprocessing.Poolto dispatch torun_azure_processin thepowerlift.run.azure_vmmodule.
The executor maintains Azure credentials in a JSON structure, generates random batch IDs for each submission, and supports credential deletion for security.
Usage
Use this executor when benchmark trials require full VM capabilities, such as GPU access, large memory, custom OS configurations, or persistent disk storage. It is more heavyweight than the container-based alternative but offers greater flexibility for compute-intensive or specialized workloads.
Code Reference
Source Location
- Repository: Interpretml_Interpret
- File:
python/powerlift/powerlift/executors/azure_vm.py
Signature
class AzureVMInstance(Executor):
def __init__(
self,
store: Store,
azure_tenant_id: str,
subscription_id: str,
azure_client_id: str,
credential=None,
azure_client_secret: Optional[str] = None,
resource_group: str = "powerlift_rg",
shell_install: Optional[str] = None,
pip_install: Optional[str] = None,
wheel_filepaths: Optional[List[str]] = None,
n_instances: int = 1,
location: Optional[str] = None,
vm_size: str = "Standard_B16s_v2",
image_publisher: str = "canonical",
image_offer: str = "ubuntu-24_04-lts",
image_sku: str = "server",
image_version: str = "latest",
disk_type: str = "Standard_LRS",
docker_db_uri: Optional[str] = None,
resource_uris: Optional[List[str]] = None,
max_undead: int = 1,
delete_on_complete: bool = True,
): ...
def submit(self, experiment_id, timeout=None): ...
def join(self): ...
def cancel(self): ...
def delete_credentials(self): ...
Import
from powerlift.executors.azure_vm import AzureVMInstance
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| store | Store | Yes | Store instance that houses trials and provides the database URI |
| azure_tenant_id | str | Yes | Azure tenant ID for authentication |
| subscription_id | str | Yes | Azure subscription ID |
| azure_client_id | str | Yes | Azure client ID for service principal |
| credential | object | No | Azure credential object (alternative to client_secret) |
| azure_client_secret | str | No | Azure client secret for service principal authentication |
| resource_group | str | No | Azure resource group name (default: "powerlift_rg") |
| n_instances | int | No | Maximum number of VMs to run simultaneously (default: 1) |
| location | str | No | Azure region; defaults to resource group location |
| vm_size | str | No | Azure VM size (default: "Standard_B16s_v2") |
| image_publisher | str | No | OS image publisher (default: "canonical") |
| image_offer | str | No | OS image offer (default: "ubuntu-24_04-lts") |
| image_sku | str | No | OS image SKU (default: "server") |
| image_version | str | No | OS image version (default: "latest") |
| disk_type | str | No | Disk storage type (default: "Standard_LRS") |
| docker_db_uri | str | No | Database URI override for VM use |
| resource_uris | List[str] | No | Azure resources to grant contributor access to |
| max_undead | int | No | Maximum VMs allowed to remain alive on init error (default: 1) |
| delete_on_complete | bool | No | Whether to delete VMs after completion (default: True) |
| wheel_filepaths | List[str] | No | Wheel files to install in the VM environment |
Outputs
| Name | Type | Description |
|---|---|---|
| join() return | List | List of results from completed VM executions |
Usage Examples
from powerlift.bench.store import Store
from powerlift.executors.azure_vm import AzureVMInstance
store = Store("postgresql://user:pass@host/db")
executor = AzureVMInstance(
store=store,
azure_tenant_id="your-tenant-id",
subscription_id="your-subscription-id",
azure_client_id="your-client-id",
azure_client_secret="your-client-secret",
n_instances=2,
vm_size="Standard_NC24ads_A100_v4", # GPU VM
disk_type="Premium_LRS", # SSD
)
executor.submit(experiment_id=1, timeout=7200)
results = executor.join()
Related Pages
- Implementation:Interpretml_Interpret_Powerlift_Executor -- Abstract base class that AzureVMInstance extends
- Implementation:Interpretml_Interpret_Powerlift_RunAzureVM -- The remote process runner that this executor delegates to
- Implementation:Interpretml_Interpret_Powerlift_AzureContainerInstance -- Lighter-weight alternative using Azure Container Instances
- Implementation:Interpretml_Interpret_Powerlift_Schema -- Database schema models used by the Store