bencher.worker_job
Classes
Represents a benchmark worker job with input variables and caching information. |
Module Contents
- class bencher.worker_job.WorkerJob
Represents a benchmark worker job with input variables and caching information.
This class encapsulates the information needed to execute a benchmark function, including input variables, dimension information, and caching metadata. It handles the preparation of function inputs and calculation of hash signatures for caching.
- function_input_vars
The values of the input variables to pass to the function
- Type:
list
- index_tuple
The indices of these values in the N-dimensional result array
- Type:
tuple[int]
- dims_name
The names of the input dimensions
- Type:
list[str]
- constant_inputs
Dictionary of any constant input values
- Type:
dict
- bench_cfg_sample_hash
Hash of the benchmark configuration without repeats
- Type:
str
- tag
Tag for grouping related jobs
- Type:
str
- function_input
Complete input as a dictionary with dimension names as keys
- Type:
dict
- canonical_input
Canonical representation of inputs for caching
- Type:
tuple[Any]
- fn_inputs_sorted
Sorted representation of function inputs
- Type:
list[tuple[str, Any]]
- function_input_signature_pure
Hash of the function inputs and tag
- Type:
str
- found_in_cache
Whether this job result was found in cache
- Type:
bool
- msgs
Messages related to this job’s execution
- Type:
list[str]
- function_input_vars: list[Any]
- index_tuple: tuple[int, Ellipsis]
- dims_name: list[str]
- constant_inputs: dict
- bench_cfg_sample_hash: str
- tag: str
- function_input: dict | None = None
- canonical_input: tuple[Any] | None = None
- fn_inputs_sorted: list[tuple[str, Any]] | None = None
- function_input_signature_pure: str | None = None
- found_in_cache: bool = False
- msgs: list[str] = []
- setup_hashes() None
Set up the function inputs and calculate hash signatures for caching.
This method prepares the function inputs by combining function input variables with dimensions and constant inputs. It also calculates hash signatures used for caching results and tracking job execution.