flambe.cluster.ssh

Implementation of the Manager for SSH hosts

Module Contents

flambe.cluster.ssh.logger[source]
flambe.cluster.ssh.FactoryT[source]
class flambe.cluster.ssh.SSHCluster(name: str, orchestrator_ip: Union[str, List[str]], factories_ips: Union[List[str], List[List[str]]], key: str, username: str, remote_context=None, use_public: bool = True, setup_cmds: Optional[List[str]] = None)[source]

Bases: flambe.cluster.cluster.Cluster

The SSH Manager needs to be used when having running instances.

For example when having on-prem hardware or just a couple of AWS EC2 instances running.

When using this cluster, the user needs to specify the IPs of the machines to use, both the public one and private one.

load_all_instances(self, exp_name: str = None, force: bool = False)[source]

This manager assumed that instances are running.

This method loads the Python objects to the manager’s variables.

Parameters:
  • exp_name (str) – The name of the experiment
  • force (bool) – Whether to override the current experiment of the same name
rollback_env(self)[source]
rsync_hosts(self)[source]

Rsyncs the host’s result folders.

First, it rsyncs all worker folders to the orchestrator main folder. After that, so that every worker gets the last changes, the orchestrator rsync with all of them.