sagemaker.core.remote_function.runtime_environment.mpi_utils_remote#
An utils function for runtime environment. This must be kept independent of SageMaker PySDK
Functions
|
Bootstrap the master node. |
|
Bootstrap the worker nodes. |
|
Entry point for bootstrap script |
Start the SSH daemon on the current node. |
|
|
Write the status file to all worker nodes. |
Classes
Class to handle host key policy for SageMaker distributed training SSH connections. |
- class sagemaker.core.remote_function.runtime_environment.mpi_utils_remote.CustomHostKeyPolicy[source]#
Bases:
MissingHostKeyPolicyClass to handle host key policy for SageMaker distributed training SSH connections.
Example: >>> client = paramiko.SSHClient() >>> client.set_missing_host_key_policy(CustomHostKeyPolicy()) >>> # Will succeed for SageMaker algorithm containers >>> client.connect(‘algo-1234.internal’) >>> # Will raise SSHException for other unknown hosts >>> client.connect(‘unknown-host’) # raises SSHException
- sagemaker.core.remote_function.runtime_environment.mpi_utils_remote.bootstrap_master_node(worker_hosts: List[str])[source]#
Bootstrap the master node.
- sagemaker.core.remote_function.runtime_environment.mpi_utils_remote.bootstrap_worker_node(master_host: str, current_host: str, status_file: str = '/tmp/done.algo-1')[source]#
Bootstrap the worker nodes.
- sagemaker.core.remote_function.runtime_environment.mpi_utils_remote.main(sys_args=None)[source]#
Entry point for bootstrap script