jobs.SweepParameter

jobs.SweepParameter(name, values=list(), _range_spec=None)

A parameter to sweep over in the job expansion.

Accepts values as: - Explicit list: [85, 90, 95] - NumPy array: np.arange(80, 99, 2) - Range specification dict: {“start”: 80, “stop”: 99, “step”: 2} or {“start”: 80, “stop”: 99, “num”: 10}

Attributes

Name Type Description
name str Parameter name (used in Jinja template).
values list[Any] List of values to sweep over.

Methods

Name Description
from_dict Create from dict (YAML/JSON deserialization).
to_dict Convert to dict for YAML/JSON serialization.

from_dict

jobs.SweepParameter.from_dict(data)

Create from dict (YAML/JSON deserialization).

to_dict

jobs.SweepParameter.to_dict()

Convert to dict for YAML/JSON serialization.

Preserves range specs when possible for cleaner YAML output.