concrete.ml.deployment.utils.md

arrow-up-right

module concrete.ml.deployment.utils

Utils.

  • Check if connection possible

  • Wait for connection to be available (with timeout)


arrow-up-right

function filter_logs

filter_logs(previous_logs: str, current_logs: str)str

Filter logs based on previous logs.

Arguments:

  • previous_logs (str): previous logs

  • current_logs (str): current logs

Returns:

  • str: filtered logs


arrow-up-right

function wait_for_connection_to_be_available

Wait for connection to be available.

Arguments:

  • hostname (str): host name

  • ip_address (str): ip address

  • path_to_private_key (Path): path to private key

  • timeout (int): ssh timeout option

  • wait_time (int): time to wait between retries

  • max_retries (int): number of retries, if < 0 unlimited retries

  • wait_bar (bool): tqdm progress bar of retries

Raises:

  • TimeoutError: if it wasn't able connect to ssh with the given constraints


arrow-up-right

function is_connection_available

Check if ssh connection is available.

Arguments:

  • hostname (str): host name

  • ip_address (str): ip address

  • path_to_private_key (Path): path to private key

  • timeout: ssh timeout option

Returns:

  • bool: True if connection succeeded

Last updated

Was this helpful?