Skip to main content

Module clients.dai_setup.client

Classes

DAISetupClient

class DAISetupClient(connection_config: h2o_engine_manager.clients.connection_config.ConnectionConfig, default_dai_setup_client: h2o_engine_manager.clients.default_dai_setup.client.DefaultDAISetupClient, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None)

DAISetupClient manages DAISetups.

Initializes DAISetupClient.

Args
connection_config : ConnectionConfig
AIEM connection configuration object.
default_dai_setup_client
DefaultDAISetupClient.
verify_ssl
Set to False to disable SSL certificate verification.
ssl_ca_cert
Path to a CA cert bundle with certificates of trusted CAs.

Methods

get_dai_setup

def get_dai_setup(self, workspace_id: str) ‑> h2o_engine_manager.clients.dai_setup.setup.DAISetup

Returns a DAISetup.

Args
workspace_id : str
The ID of a workspace.
Returns
DAISetup
DAISetup associated with a given workspace.

get_default_dai_setup

def get_default_dai_setup(self) ‑> h2o_engine_manager.clients.default_dai_setup.setup.DefaultDAISetup

Returns DefaultDAISetup.

Returns
DefaultDAISetup
global DefaultDAISetup.

update_dai_setup

def update_dai_setup(self, dai_setup: h2o_engine_manager.clients.dai_setup.setup.DAISetup, update_mask: str = '*') ‑> h2o_engine_manager.clients.dai_setup.setup.DAISetup

Updates the DAISetup.

Args
dai_setup : DAISetup
The DAISetup to be updated.
update_mask : str, optional

Comma separated paths referencing which fields to update. Update mask must be non-empty.

Allowed field paths are: yaml_gpu_tolerations.

Paths are case sensitive (must match exactly). Example - update only cpu constraint: update_mask="cpu_constraint" Example - update only cpu and gpu constraints: update_mask="cpu_constraint,gpu_constraint"

To update all allowed fields, specify exactly one path with value "*", this is a default value.

Returns
DAISetup
An updated DAISetup.

update_default_dai_setup

def update_default_dai_setup(self, default_dai_setup: h2o_engine_manager.clients.default_dai_setup.setup.DefaultDAISetup, update_mask: str = '*') ‑> h2o_engine_manager.clients.default_dai_setup.setup.DefaultDAISetup

Updates the DefaultDAISetup.

Args
default_dai_setup : DAISetup
The DefaultDAISetup to be updated.
update_mask : str, optional

Comma separated paths referencing which fields to update. Update mask must be non-empty.

Allowed field paths are: yaml_gpu_tolerations.

Paths are case sensitive (must match exactly). Example - update only cpu constraint: update_mask="cpu_constraint" Example - update only cpu and gpu constraints: update_mask="cpu_constraint,gpu_constraint"

To update all allowed fields, specify exactly one path with value "*", this is a default value.

Returns
DefaultDAISetup
The updated DefaultDAISetup.

Feedback