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,
    config_name='sweep_config.jshc',
)

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
config_name str Name for the generated config file. 'sweep_config.jshc'

Returns

Name Type Description
JobSet JobSet containing all expanded jobs.