bundle.lambdalabs.runner¶
Lambda Labs remote job runner — full lifecycle management.
Attributes¶
Classes¶
Manages a single remote training job on Lambda Labs. |
Module Contents¶
- bundle.lambdalabs.runner.log¶
- bundle.lambdalabs.runner.BUNDLE_INSTALL_CMD = 'pip install --quiet thebundle 2>/dev/null || pip install --quiet...¶
- class bundle.lambdalabs.runner.RemoteJob(config: bundle.lambdalabs.config.LambdaLabsConfig | None = None, api_key: str | None = None, ssh_key_path: pathlib.Path | None = None, ssh_user: str = 'ubuntu', auto_terminate: bool = False, filesystem_name: str | None = None)¶
Manages a single remote training job on Lambda Labs.
- Lifecycle:
launch() — start a GPU instance (or attach to an existing one)
wait() — poll until active + has IP
setup() — install bundle on the remote instance
upload() — rsync local workspace → remote (skips unchanged files)
run() — execute a command via SSH
download() — rsync remote results → local
terminate()— shut down the instance (optional)
- Filesystem mode (recommended):
Pass
filesystem_nameto mount a Lambda Labs persistent NFS volume. The workspace lives at/home/ubuntu/<filesystem_name>/and survives instance termination — images and SfM output are never re-uploaded. Only the smallruns/results are downloaded after each job.
- config¶
- ssh_key_path¶
- ssh_user = 'ubuntu'¶
- auto_terminate = False¶
- instance: bundle.lambdalabs.models.Instance | None = None¶
- async launch(instance_type: str | None = None, ssh_key_name: str | None = None, region: str | None = None, name: str | None = None, instance_id: str | None = None) bundle.lambdalabs.models.Instance¶
Launch a new instance or attach to an existing one by ID.
- async wait(timeout: float = 600) bundle.lambdalabs.models.Instance¶
Poll until the instance is active with an IP.
- async upload(local: pathlib.Path, remote: pathlib.Path, skip_existing: bool = False) None¶
rsync local directory → remote instance.
When
skip_existing=True(set automatically in filesystem mode), files already on the remote are not re-transferred — saving time and bandwidth for large image datasets on subsequent runs.
- async download(remote: pathlib.Path, local: pathlib.Path) None¶
rsync remote directory → local.