concrete.ml.deployment.utils.md
module concrete.ml.deployment.utils
concrete.ml.deployment.utilsUtils.
Check if connection possible
Wait for connection to be available (with timeout)
function filter_logs
filter_logsfilter_logs(previous_logs: str, current_logs: str) → strFilter logs based on previous logs.
Arguments:
previous_logs(str): previous logscurrent_logs(str): current logs
Returns:
str: filtered logs
function wait_for_connection_to_be_available
wait_for_connection_to_be_availablewait_for_connection_to_be_available(
hostname: str,
ip_address: str,
path_to_private_key: Path,
timeout: int = 1,
wait_time: int = 1,
max_retries: int = 20,
wait_bar: bool = False
)Wait for connection to be available.
Arguments:
hostname(str): host nameip_address(str): ip addresspath_to_private_key(Path): path to private keytimeout(int): ssh timeout optionwait_time(int): time to wait between retriesmax_retries(int): number of retries, if < 0 unlimited retrieswait_bar(bool): tqdm progress bar of retries
Raises:
TimeoutError: if it wasn't able connect to ssh with the given constraints
function is_connection_available
is_connection_availableis_connection_available(
hostname: str,
ip_address: str,
path_to_private_key: Path,
timeout: int = 1
)Check if ssh connection is available.
Arguments:
hostname(str): host nameip_address(str): ip addresspath_to_private_key(Path): path to private keytimeout: ssh timeout option
Returns:
bool: True if connection succeeded
Last updated
Was this helpful?