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: boolSkip 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: boolEmit 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
impl PublishArgs
Sourcepub fn ssh_config(&self) -> Option<SshConfig>
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
impl Debug for PublishArgs
Source§impl FdlArgsTrait for PublishArgs
impl FdlArgsTrait for PublishArgs
Source§fn try_parse_from(args: &[String]) -> Result<Self, String>
fn try_parse_from(args: &[String]) -> Result<Self, String>
Source§fn render_help() -> String
fn render_help() -> String
--help to a string.Source§fn render_help_path(argv: &[String]) -> String
fn render_help_path(argv: &[String]) -> String
--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