Expand description
fdl.yml manifest loading, validation, and resolved-command types.
fdl.yaml configuration loading and discovery.
Walks up from CWD to find the project manifest, parses YAML/JSON, and loads sub-command configs from registered command directories.
Structs§
- ArgSpec
- A positional argument.
- Command
Config - Sub-command fdl.yaml (e.g., ddp-bench/fdl.yaml).
- Command
Spec - A command at any nesting level. Three mutually-exclusive kinds are recognised at resolve time:
- DdpConfig
- DDP configuration. Maps 1:1 to flodl DdpConfig / DdpRunConfig.
- Option
Spec - A flag option,
--name/-x. - Output
Config - Output settings.
- Project
Config - Root fdl.yaml at project root.
- Resolved
Config - Fully resolved configuration ready for arg translation.
- Schema
- The schema declared inline in a sub-command’s fdl.yaml. Maps 1:1 to
what
<entry> --fdl-schemawill later emit as JSON. - Speed
Hint - Training
Config - Training scalars.
Enums§
- Command
Kind - What kind of command is this, resolved from a
CommandSpec.
Functions§
- config_
layer_ sources - Source path list for a base config + env overlay, in merge order. Used
by
fdl config showto annotate which layer a value came from. - defaults_
only - Resolved config from root defaults only (no job).
- find_
config - Walk up from
startlooking for fdl.yaml. - load_
command - Load a command config from a sub-directory.
- load_
command_ with_ env - Load a sub-command config with an optional environment overlay.
- load_
merged_ value - Load the raw merged
serde_yaml::Valuefor a config + optional env overlay. Exposed so callers likefdl config showcan inspect the resolved view before it is deserialized into a strongly-typed struct. - load_
project - Load a project config from a specific path.
- load_
project_ with_ env - Load a project config with an optional environment overlay.
- merge_
preset - Merge the enclosing
CommandConfigdefaults with a named preset’s overrides. Preset values win. Used when dispatching an inline preset command (neitherrunnorpath). - resolve_
config_ layers - Resolve every layer contributing to a config, in merge order, with
inherit-from:chains expanded. Paired with the base file + optional env overlay, the result is[chain(base)..., chain(env_overlay)...]de-duplicated by canonical path (kept-first). - schema_
to_ args_ spec - Convert a
Schemainto anArgsSpecsuitable for strict-mode tail validation. Positionalrequiredflags are intentionally dropped: the binary itself will enforce them after parsing, and treating them as required here would turn “missing positional” into a double-errored mess. - validate_
preset_ for_ exec - Validate a single preset that’s about to be invoked. Combines the
always-on
choices:check and, ifschema.strict, the unknown-key rejection — scoped to just this preset, not the wholecommands:map. Called from the exec path so typos in a sibling preset don’t block--helpfor a correct one. - validate_
preset_ values - Always-on: validate preset YAML
options:values against declaredchoices:in the schema. An option YAML value whose key matches a declared option with achoices:list must be one of those choices. Keys not declared in the schema are ignored here — those are the concern ofvalidate_presets_strict(opt-in). - validate_
presets_ strict - At load time, reject preset
options:keys that are not declared in the enclosing schema. Runs only whenschema.strict == true, and only against entries resolved toCommandKind::Preset—run:andpath:kinds don’t share the parent schema. - validate_
schema - Check a schema for collisions and structural issues.
- validate_
tail - Validate the user’s extra argv tail against a schema. Always called
before
run::exec_command— the parser’s lenient-unknowns mode is keyed offschema.strictso choice validation on declared flags fires regardless, while unknown-flag rejection stays opt-in.