whylogs.core.feature_weights
#
Module Contents#
Classes#
A Writable is an object that contains data to write to a file or files. |
- class whylogs.core.feature_weights.FeatureWeights(weights: Dict[str, float], segment: Optional[whylogs.core.Segment] = None, metadata: Optional[Dict] = None)#
Bases:
whylogs.api.writer.writer.Writable
A Writable is an object that contains data to write to a file or files. These might be temporary files intended to be passed on to another consumer (e.g., WhyLabs servers) via a Writer.
- Parameters
segment (Optional[whylogs.core.Segment]) –
metadata (Optional[Dict]) –
- write(path: Optional[str] = None, **kwargs: Any) Tuple[bool, Union[str, List[str]]] #
Writes the Writable’s data to file(s) under path (excluding filename(s)) if specified, else under _get_default_path(). filename specifies the file to write there. Writables can generate a default filename if None is specified. Returns a bool that’s True iff all files were written successfully and a list of the filenames (including path) written.
- to_dict() Dict[str, Union[Optional[whylogs.core.Segment], Optional[float]]] #
- Return type
Dict[str, Union[Optional[whylogs.core.Segment], Optional[float]]]