bencher.worker_job ================== .. py:module:: bencher.worker_job Classes ------- .. autoapisummary:: bencher.worker_job.WorkerJob Module Contents --------------- .. py:class:: 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. .. attribute:: function_input_vars The values of the input variables to pass to the function :type: list .. attribute:: index_tuple The indices of these values in the N-dimensional result array :type: tuple[int] .. attribute:: dims_name The names of the input dimensions :type: list[str] .. attribute:: constant_inputs Dictionary of any constant input values :type: dict .. attribute:: bench_cfg_sample_hash Hash of the benchmark configuration without repeats :type: str .. attribute:: tag Tag for grouping related jobs :type: str .. attribute:: function_input Complete input as a dictionary with dimension names as keys :type: dict .. attribute:: canonical_input Canonical representation of inputs for caching :type: tuple[Any] .. attribute:: fn_inputs_sorted Sorted representation of function inputs :type: list[tuple[str, Any]] .. attribute:: function_input_signature_pure Hash of the function inputs and tag :type: str .. attribute:: found_in_cache Whether this job result was found in cache :type: bool .. attribute:: msgs Messages related to this job's execution :type: list[str] .. py:attribute:: function_input_vars :type: list[Any] .. py:attribute:: index_tuple :type: tuple[int, Ellipsis] .. py:attribute:: dims_name :type: list[str] .. py:attribute:: constant_inputs :type: dict .. py:attribute:: bench_cfg_sample_hash :type: str .. py:attribute:: tag :type: str .. py:attribute:: function_input :type: dict | None :value: None .. py:attribute:: canonical_input :type: tuple[Any] | None :value: None .. py:attribute:: fn_inputs_sorted :type: list[tuple[str, Any]] | None :value: None .. py:attribute:: function_input_signature_pure :type: str | None :value: None .. py:attribute:: found_in_cache :type: bool :value: False .. py:attribute:: msgs :type: list[str] :value: [] .. py:method:: 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.