Plan Components
omnirec.runner.plan_components.Grid(values: Iterable[T])
dataclass
Bases: PlanComponentBase[T]
Exhaustive grid search over a fixed set of values.
All provided values are returned by get_values(), and the framework
generates one experiment run for every combination across all Grid
parameters in an algorithm_config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
Iterable[T]
|
The values to enumerate. |
required |
Example
omnirec.runner.plan_components.RandomChoice(choices: Sequence[T], n: int)
dataclass
Bases: RandomBase[T]
Random sampling of n items from a discrete list of choices.
Useful for random search over a predefined set of candidate values. The sample is drawn without replacement using the global OmniRec random state, ensuring reproducibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
choices
|
Sequence[T]
|
Pool of candidate values to sample from. |
required |
n
|
int
|
Number of values to draw. |
required |
Example
omnirec.runner.plan_components.RandomRange(start: T, end: T, n: int)
dataclass
Bases: RandomBase[T]
Random sampling of n values from a numeric range.
- If both
startandendareint, values are drawn without replacement from the integer range[start, end](inclusive). - If either bound is a
float, values are drawn independently from a uniform distribution over[start, end].
The random state is derived from the global OmniRec random seed, ensuring reproducibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
int | float
|
Lower bound of the range (inclusive). |
required |
end
|
int | float
|
Upper bound of the range (inclusive). |
required |
n
|
int
|
Number of values to sample. |
required |