jobs.JobConfig
jobs.JobConfig(
template_path=None,
template_string=None,
simulation='Main',
replicates=1,
source_path=None,
sweep=None,
file_mappings=dict(),
upload_source_path=None,
upload_config_path=None,
upload_data_path=None,
output_steps=None,
seed=None,
crs=None,
use_float64=False,
)Configuration for a job (may be template for expansion).
Attributes
| Name | Type | Description |
|---|---|---|
| template_path | Path | None | Path to Jinja template file (.jshc.j2). |
| template_string | str | None | Jinja template as string (alternative to template_path). |
| simulation | str | Name of simulation to run. |
| replicates | int | Number of replicates per job. |
| sweep | SweepConfig | None | Parameter sweep configuration. |
| source_path | Path | None | Path to .josh source file. |
| file_mappings | dict[str, Path] | Map of data file names to paths. |
| upload_source_path | str | None | Template for uploading source files. |
| upload_config_path | str | None | Template for uploading config files. |
| upload_data_path | str | None | Template for uploading data files. |
| output_steps | str | None | Step range to output (e.g., “0-10,50,100”). |
| seed | int | None | Random seed for reproducibility. |
| crs | str | None | Coordinate reference system. |
| use_float64 | bool | Use double precision instead of BigDecimal. |
Note
Export paths should be configured in the .jshc template file itself using Josh’s template variable syntax (e.g., exportFiles.patch = “file:///{param}_{replicate}.csv”). Josh resolves {param} from –custom-tag arguments and {replicate} automatically.
Methods
| Name | Description |
|---|---|
| from_dict | Create from dict. |
| from_yaml | Create from YAML string. |
| from_yaml_file | Load from YAML file. |
| save_yaml | Save to YAML file. |
| to_dict | Convert to dict for serialization. |
| to_yaml | Serialize to YAML string. |
from_dict
jobs.JobConfig.from_dict(data)Create from dict.
from_yaml
jobs.JobConfig.from_yaml(yaml_content)Create from YAML string.
from_yaml_file
jobs.JobConfig.from_yaml_file(path)Load from YAML file.
save_yaml
jobs.JobConfig.save_yaml(path)Save to YAML file.
to_dict
jobs.JobConfig.to_dict()Convert to dict for serialization.
to_yaml
jobs.JobConfig.to_yaml()Serialize to YAML string.