mlos_bench.services.remote.azure.azure_saas

A collection Service functions for configuring SaaS instances on Azure.

Classes

AzureSaaSConfigService

Helper methods to configure Azure Flex services.

Module Contents

class mlos_bench.services.remote.azure.azure_saas.AzureSaaSConfigService(config: Dict[str, Any] | None = None, global_config: Dict[str, Any] | None = None, parent: mlos_bench.services.base_service.Service | None = None, methods: Dict[str, Callable] | List[Callable] | None = None)[source]

Bases: mlos_bench.services.base_service.Service, mlos_bench.services.types.remote_config_type.SupportsRemoteConfig

Helper methods to configure Azure Flex services.

Create a new instance of Azure services proxy.

Parameters:
  • config (dict) – Free-format dictionary that contains the benchmark environment configuration.

  • global_config (dict) – Free-format dictionary of global parameters.

  • parent (Service) – Parent service that can provide mixin functions.

  • methods (Union[Dict[str, Callable], List[Callable], None]) – New methods to register with the service.

configure(config: Dict[str, Any], params: Dict[str, Any]) Tuple[mlos_bench.environments.status.Status, dict][source]

Update the parameters of an Azure DB service.

Parameters:
  • config (Dict[str, Any]) – Key/value pairs of configuration parameters (e.g., vmName).

  • params (Dict[str, Any]) – Key/value pairs of the service parameters to update.

Returns:

result – A pair of Status and result. The result is always {}. Status is one of {PENDING, SUCCEEDED, FAILED}

Return type:

(Status, dict)

is_config_pending(config: Dict[str, Any]) Tuple[mlos_bench.environments.status.Status, dict][source]

Check if the configuration of an Azure DB service requires a reboot or restart.

Parameters:

config (Dict[str, Any]) – Key/value pairs of configuration parameters (e.g., vmName).

Returns:

result – A pair of Status and result. A Boolean field “isConfigPendingRestart” indicates whether the service restart is required. If “isConfigPendingReboot” is set to True, rebooting a VM is necessary. Status is one of {PENDING, TIMED_OUT, SUCCEEDED, FAILED}

Return type:

(Status, dict)