Skip to main content

CommandConfig

Struct CommandConfig 

Source
pub struct CommandConfig {
    pub description: Option<String>,
    pub entry: Option<String>,
    pub docker: Option<String>,
    pub ddp: Option<DdpConfig>,
    pub training: Option<TrainingConfig>,
    pub output: Option<OutputConfig>,
    pub commands: BTreeMap<String, CommandSpec>,
    pub arg_name: Option<String>,
    pub schema: Option<Schema>,
    pub compile: Option<bool>,
}
Expand description

Sub-command fdl.yaml (e.g., ddp-bench/fdl.yaml).

Identical shape to ProjectConfig but with an executable entry: and optional structured config sections (ddp/training/output) that inline preset commands can override.

Fields§

§description: Option<String>§entry: Option<String>§docker: Option<String>

Docker compose service name. When set, entry is wrapped in docker compose run --rm <service> bash -c "cd <workdir> && <entry> <args>".

§ddp: Option<DdpConfig>§training: Option<TrainingConfig>§output: Option<OutputConfig>§commands: BTreeMap<String, CommandSpec>

Nested commands — inline presets of this config’s entry, standalone run scripts, or path pointers to child fdl.yml files.

§arg_name: Option<String>

Help-only placeholder name for the first-positional slot when commands: holds presets. Defaults to “preset”. Pure UX — it does not affect dispatch (presets are always looked up by name). Useful to match domain vocabulary, e.g. arg-name: recipe or arg-name: target.

§schema: Option<Schema>

Inline interim schema (before <entry> --fdl-schema is implemented). Drives help rendering, validation, and completions.

§compile: Option<bool>

Opt-in flag for cargo-entry schema probing. Cargo entries are auto-skipped from probing because cargo run --fdl-schema triggers a full compile (unacceptable latency for -h). Setting compile: true declares “I’m fine with the first-run compile cost — probe my binary for its real schema.” Subsequent invocations use the mtime-keyed cache and pay no compile cost. Absent or false keeps the default skip behavior, so the inline yml schema (if any) stays the source of truth.

Trait Implementations§

Source§

impl Debug for CommandConfig

Source§

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

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

impl Default for CommandConfig

Source§

fn default() -> CommandConfig

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

impl<'de> Deserialize<'de> for CommandConfig

Source§

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

Deserialize this value from the given Serde deserializer. 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.
Source§

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