Skip to main content

Manifest

Struct Manifest 

Source
pub struct Manifest {
    pub cwd: Option<String>,
    pub build: Option<String>,
    pub bin: String,
    pub args: Vec<String>,
    pub origin: Option<String>,
    pub rustc: Option<String>,
    pub published_epoch: Option<u64>,
    pub run: Option<String>,
    pub built: bool,
}
Expand description

The controller’s answer to “what is this run”, written beside the source it published and read by every box that fetches it.

It exists because a worker’s own config is the wrong place for anything that changes per run. args is the sharp case: they must match the run, since rank children re-enter the binary with them, so a standing fleet carrying its own copy trains the next run with the previous one’s hyperparameters. Everything stable for a box (its credentials, its libtorch policy, where to pull from) stays local; everything that belongs to the run comes from here.

Its presence is the publish’s commit point. fdl publish removes it before it touches the tree and writes it only once the build has passed, so a box that dials mid-publish, or after a publish whose build failed, finds no manifest and waits for the next dial rather than training something unvalidated.

Fields§

§cwd: Option<String>

Project directory inside the tree; None = its root.

§build: Option<String>

Build recipe; None = the default cargo release build.

§bin: String

Artifact, relative to cwd.

§args: Vec<String>

The binary’s own arguments.

§origin: Option<String>

Where the controller got this tree, for provenance.

§rustc: Option<String>

rustc -V on the controller when it built this, ADVISORY. A mismatch is worth reporting and not worth enforcing: every box compiles its own binary, cohort agreement is about model structure, and a toolchain too old fails loudly at compile time anyway. Enforcing it would cost a toolchain install per box and buy what a warning already gives.

§published_epoch: Option<u64>

Unix seconds at publish, so a box can say how old its run is.

§run: Option<String>

Identity of this publish, a fresh nonce every time (hex). It rides each worker’s join hello, and the window refuses a cohort whose members hold different ids — two boxes that fetched across a publish boundary would train two different runs as one world. A nonce rather than a content hash on purpose: the common re-publish is “same args, new code”, which a manifest hash would call identical, and hashing the tree buys the same answer for the price of reading every file. None (an old manifest, a hand-built tree) gates nothing.

§built: bool

False when the publish skipped its build gate (--no-build), so a worker can say out loud that nothing has compiled this tree yet.

Implementations§

Source§

impl Manifest

Source

pub fn read(tree: &Path) -> Result<Option<Manifest>, Fail>

Read the manifest at the root of tree. Ok(None) when there is none, which is a state with meaning rather than an error: nobody has published a run into this tree.

Source

pub fn write(&self, tree: &Path) -> Result<(), Fail>

Write the manifest at the root of tree.

Source

pub fn remove(tree: &Path) -> Result<(), Fail>

Remove the manifest, which is how a publish says “not ready yet”.

Trait Implementations§

Source§

impl Clone for Manifest

Source§

fn clone(&self) -> Manifest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Manifest

Source§

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

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

impl Default for Manifest

Source§

fn default() -> Manifest

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Manifest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Manifest

Source§

impl PartialEq for Manifest

Source§

fn eq(&self, other: &Manifest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Manifest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Manifest

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.