ComputationResult.values is a read-only mapping from resolved feature names to FeatureValue
objects. NumPy computations return floating-point scalars; Torch computations return scalar
tensors. A mathematically undefined output has value=None, status=INVALID, and a message.
FeatureValue.definition identifies the mathematical definition. ExecutionMetadata records
input and preprocessing fingerprints, options, requested features, evaluated intermediates,
runtime, additional objective evaluations, and backend execution details.
Use the preprocessing fingerprint together with feature definitions and execution options
for result caching. See results and provenance.
@dataclass(frozen=True,slots=True)classExecutionMetadata:sample_fingerprint:strrequested_features:tuple[str,...]computed_intermediates:tuple[str,...]runtime_seconds:floatadditional_objective_evaluations:intwarnings:tuple[str,...]=()workers:int=1backend:BackendName="numpy"device:DeviceType="cpu"device_index:int|None=Nonedtype:FloatingDType="float64"y_normalization:YNormalization=Noneconstant_objective:bool=Falseoptions:FeatureOptions=field(default_factory=resolve_options)@propertydefy_normalization_definition(self)->str:returnnormalization_definition(self.y_normalization)@propertydefpreprocessing_fingerprint(self)->str:"""Cache-key component identifying raw input, backend, dtype, and preprocessing. A full result cache must additionally include feature definitions and execution options. """identity=(self.sample_fingerprint,self.backend,self.dtype,self.y_normalization_definition,)returnhashlib.sha256("\0".join(identity).encode("utf-8")).hexdigest()def__post_init__(self)->None:normalization_definition(self.y_normalization)object.__setattr__(self,"options",resolve_options(self.options))ifself.runtime_seconds<0:raiseValueError("runtime_seconds must not be negative")ifself.additional_objective_evaluations<0:raiseValueError("additional objective evaluations must not be negative")ifself.workers==0orself.workers<-1:raiseValueError("workers must be -1 or a positive integer")ifself.backendnotin("numpy","torch"):raiseValueError(f"unsupported backend: {self.backend!r}")ifself.devicenotin("cpu","cuda","mps"):raiseValueError(f"unsupported device type: {self.device!r}")ifself.device_indexisnotNoneandself.device_index<0:raiseValueError("device index must not be negative")ifself.dtypenotin("float32","float64"):raiseValueError(f"unsupported floating dtype: {self.dtype!r}")