jobs.JobExpander

jobs.JobExpander(jinja_env=None)

Expands JobConfig with sweeps into concrete ExpandedJobs.

Attributes

Name Type Description
jinja_env Any Jinja2 Environment for template rendering.

Methods

Name Description
expand Expand a JobConfig into a JobSet with one ExpandedJob per parameter combo.

expand

jobs.JobExpander.expand(config, output_dir=None, *, cli=None)

Expand a JobConfig into a JobSet with one ExpandedJob per parameter combo.

Parameters

Name Type Description Default
config JobConfig The job configuration to expand. required
output_dir Path | None Directory to write configs to (uses temp dir if None). None
cli JoshCLI | None Optional JoshCLI used to auto-discover the model’s import closure via inspect-imports. When provided and config.import_files is empty, the closure is discovered authoritatively from josh’s own resolver (transitive, validated exactly as at run time) and materialized/hashed. When config.import_files is set, it always overrides discovery. When cli is None (the default), expansion stays JVM-free — the declared import_files (if any) are used verbatim, and a single-file model keeps its legacy hash. None

Returns

Name Type Description
JobSet JobSet containing all expanded jobs.