Skip to main content

PublishArgs

Struct PublishArgs 

Source
pub struct PublishArgs {
    pub source: Option<String>,
    pub bin: Option<String>,
    pub cwd: Option<String>,
    pub build: Option<String>,
    pub to: Option<String>,
    pub no_build: bool,
    pub identity: Option<String>,
    pub json: bool,
    pub gate: Vec<String>,
}
Expand description

Publish a training run for a fleet to pull.

The controller side of compiling on the node: resolves a source spec into a served directory, builds it once as a gate, and writes the run manifest workers read. Chaining runs on a standing fleet is then one command — publish again and every box picks the new run up on its next dial, with nothing to edit on any worker.

Arguments after a standalone -- are the training binary’s own, and they go in the manifest rather than into any worker’s config: they must match the run, because rank children re-enter the binary with them, so a fleet carrying its own copy would train the next run with the previous one’s hyperparameters.

The build proves the tree for THIS box’s libtorch variant, and one build is all it is: every worker still compiles its own, since a controller producing binaries for N variants is a build matrix. A gate needs no GPU libtorch — fdl libtorch download --cpu is enough — because it is catching user-code errors, not shipping an artifact.

Exit code: 0 when the run is published; 1 otherwise, and a failed gate publishes nothing, so the fleet keeps running whatever it had.

Fields§

§source: Option<String>

Source to publish: file:///abs/path, rsync://[user@]host[:port]:/abs/path, or git+https://host/owner/repo#<tag|branch|sha>.

§bin: Option<String>

Built artifact, relative to the project directory — what workers run. Required: a workspace member’s build lands in the WORKSPACE target/, so no rule fdl invented would be right for everyone.

§cwd: Option<String>

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

§build: Option<String>

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

§to: Option<String>

Served directory (default: ~/.flodl/run). The tree lands in <dir>/tree, which is what a worker’s source spec points at.

§no_build: bool

Skip the build gate. Publishes source nothing has compiled, so the first worker to fetch it is where a broken build surfaces.

§identity: Option<String>

Identity file for a source pulled over ssh (rsync -e ssh -i).

§json: bool

Emit the report as JSON on stdout (notes stay on stderr). The machine twin of the human report, for dashboards and scripts.

§gate: Vec<String>

Extra check-build against another libtorch variant (a subpath under <project>/libtorch/, e.g. precompiled/rocm70). Repeatable. The primary gate proves only this box’s variant, so a break that exists only under the other vendor’s feature would land on a worker. Needs no GPU; a flodl-linking crate still needs that vendor’s dev headers here (a package install, and the failure names the exact one).

Implementations§

Source§

impl PublishArgs

Source

pub fn ssh_config(&self) -> Option<SshConfig>

Credentials for a source pulled over ssh. The spec itself carries user, host and port, so only the key can be missing.

Trait Implementations§

Source§

impl Debug for PublishArgs

Source§

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

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

impl FdlArgsTrait for PublishArgs

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.