romtools.hpc.dispatchers.remote_dispatcher#
Classes
|
Runs ROM workflows on a remote host over SSH, connecting as user@remote:port. |
- class romtools.hpc.dispatchers.remote_dispatcher.RemoteDispatcher(campaign_directory='hpctools', logger=None, connection=None, config=None)[source]#
Bases:
BaseDispatcherRuns ROM workflows on a remote host over SSH, connecting as user@remote:port.
Coordinates composed helpers rather than doing the work itself: files go through RemoteFileManager, Python calls through RemoteCaller, batch jobs through SlurmJobManager, and archives through RemoteTransferManager. Paths are taken relative to the configured remote root.
- Parameters:
logger (Logger) – An instance of the Logger class for logging
campaign_directory (str) – An optional string naming the directory this campaign runs in, relative to the remote root. It is mirrored locally and under the remote root.
config – A YAML path or a Configuration. Defaults to reading the command line.
connection (Connection | None)
- run(cmd, run_directory=None)[source]#
Run a command directly on the remote host, without SLURM.
This lands wherever the SSH session does, which on a cluster is the login node, so it suits quick staging or preprocessing; anything long or parallel belongs in submit_job(). run_directory is relative to the remote root, and defaults to the root itself.
Returns a Result object (with stdout, stderr, exit_code, ok)
- Parameters:
cmd (str)
run_directory (str)
- Return type: