Skip to main content

JoinArgs

Struct JoinArgs 

Source
pub struct JoinArgs {
Show 17 fields pub controller: Option<String>, pub ssh: Option<String>, pub identity: Option<String>, pub token: Option<String>, pub bin: Option<String>, pub source: Option<String>, pub source_cwd: Option<String>, pub source_build: Option<String>, pub source_bin: Option<String>, pub libtorch: Option<String>, pub host: Option<String>, pub devices: Option<String>, pub persist: bool, pub data_path: Option<String>, pub data_source: Option<String>, pub gpu_ram_share: Option<f64>, pub no_sig_probe: bool,
}
Expand description

Join a cluster run’s window as a self-deployed worker.

Dials the controller’s join channel, offers this box’s GPUs, and runs the training binary (--bin) in agent role: the binary joins, then spawns and supervises this host’s relay and rank children itself. Every flag defaults from the join: block of fdl.yml when present; flags win. Arguments after a standalone -- go to the training binary verbatim (they must match the run — rank children re-enter the binary with them).

Trust, mirroring join admission: --token presents the run’s pre-shared credential; --ssh reaches a loopback-bound controller through its guardrailed sshd (reachability = authentication); with neither, the controller must run open admission.

Before dialing, the box is prepared: the GPU stack is checked, the dataset source root is put where the ranks will look for it (--data-source mounts it read-only when it is not already there), the directories the data plane writes are proven writable, and anything this box does not have yet is acquired — a libtorch variant (--libtorch) and the training binary itself (--source, fetched to local disk and built here, which is what makes its ABI match the libtorch it holds). Preparation re-runs per attempt, so a --persist box picks up a changed source on its next re-dial.

Exit code: the agent’s exit code (0 = this host finished cleanly); 2 for a failure retrying cannot fix (no GPU, a spec that does not parse, a missing binary or toolchain), which --persist does not re-dial; 1 for a transient one, which it does — the systemd / golden-image mode. Source that does not compile counts as transient on purpose: the fix is a push away at the source, and a box that stopped permanently over a typo would be powered off by the systemd recipe. Exception: a compile failure with the vendor toolkit headers missing is permanent, since re-dialing cannot install a package.

Fields§

§controller: Option<String>

Controller mux address, host[:port] (default port 1337). With --ssh, the address as seen FROM the ssh host — the default 127.0.0.1:1337 is the sshd-on-the-controller-box convention.

§ssh: Option<String>

SSH tunnel hop, [user@]host[:port]: brings up a local -L forward of the controller port and dials through it.

§identity: Option<String>

Identity file for the tunnel (ssh -i).

§token: Option<String>

Pre-shared session credential (the run’s controller.join.token).

§bin: Option<String>

Training binary to run in agent role, as a path on this box. Mutually exclusive with --source.

§source: Option<String>

Build the training binary here instead: a source spec, one of file:///abs/path, rsync://[user@]host[:port]:/abs/path or git+https://host/owner/repo#<tag|branch|sha>. Fetched to local disk, then built against this box’s libtorch.

§source_cwd: Option<String>

Project directory inside the fetched source tree (default: its root). Governs the build and the run both.

§source_build: Option<String>

Build recipe for the fetched source, a shell line (default: cargo build --release). Gets LIBTORCH_PATH, FDL_GPU_FEATURE and LD_LIBRARY_PATH.

§source_bin: Option<String>

Built artifact, relative to the project directory, e.g. target/release/train.

§libtorch: Option<String>

libtorch variant to acquire into ~/.flodl/libtorch/ before building or running: auto, cpu, cu126, cu128, rocm7.0, rocm7.1. auto routes on this box’s own devices, so one image serves both vendors. Default: whatever is already active here.

§host: Option<String>

Logical host name in the roster (default: this machine’s hostname).

§devices: Option<String>

GPU device ids to offer, comma-separated (default: all GPUs on this host).

§persist: bool

Keep re-dialing across runs with backoff instead of exiting when the agent does.

§data_path: Option<String>

Dataset source root on this box, shipped to this host’s ranks (with --data-source, the mountpoint; default /flodl/data).

§data_source: Option<String>

Transport that establishes the source root when it is not already mounted, e.g. sshfs://user@ctrl:/flodl/data.

§gpu_ram_share: Option<f64>

Integrated-GPU host-RAM share of this box, a fraction of its physical RAM, e.g. 0.5 (APU boxes only; discrete GPUs ignore it). Ships to this host’s ranks like --data-path does.

§no_sig_probe: bool

Skip the pre-dial model-signature probe (a short CPU-only re-run of the training binary; admission uses the signature to refuse a box building a different model). Skip it for a binary whose startup is too heavy to run twice per dial.

Trait Implementations§

Source§

impl Debug for JoinArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FdlArgsTrait for JoinArgs

Source§

fn try_parse_from(args: &[String]) -> Result<Self, String>

Parse from an explicit argv slice. First element is the program name (ignored), following elements are flags/values/positionals.
Source§

fn schema() -> Schema

Return the JSON schema for this CLI shape.
Source§

fn render_help() -> String

Render --help to a string.
Source§

fn parse() -> Self

Parse argv into Self. Uses std::env::args() by default.
Source§

fn render_help_path(argv: &[String]) -> String

Render --help for a specific argv path (program name first, then the tokens typed). The default ignores the path and returns Self::render_help — correct for a single struct, whose help is context-free. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.