whylogs.core.view.segmented_dataset_profile_view#

Module Contents#

Classes#

SegmentedDatasetProfileView

A Writable is an object that contains data to write to a file or files.

Attributes#

whylogs.core.view.segmented_dataset_profile_view.logger#
class whylogs.core.view.segmented_dataset_profile_view.SegmentedDatasetProfileView(*, profile_view: whylogs.core.view.dataset_profile_view.DatasetProfileView, segment: whylogs.core.segment.Segment, partition: whylogs.core.segmentation_partition.SegmentationPartition)#

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
property segment: whylogs.core.segment.Segment#
Return type

whylogs.core.segment.Segment

property partition: whylogs.core.segmentation_partition.SegmentationPartition#
Return type

whylogs.core.segmentation_partition.SegmentationPartition

property profile_view: whylogs.core.view.dataset_profile_view.DatasetProfileView#
Return type

whylogs.core.view.dataset_profile_view.DatasetProfileView

property dataset_timestamp: Optional[datetime.datetime]#
Return type

Optional[datetime.datetime]

property creation_timestamp: Optional[datetime.datetime]#
Return type

Optional[datetime.datetime]

property model_performance_metrics: Any#
Return type

Any

property metadata: Dict[str, str]#
Return type

Dict[str, str]

get_segment_string() str#
Return type

str

write(path: Optional[str] = None, filename: 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.

Parameters
  • path (Optional[str]) –

  • filename (Optional[str]) –

  • kwargs (Any) –

Return type

Tuple[bool, Union[str, List[str]]]

writer(name: str = 'local', **kwargs: Any) WriterWrapper#

Utility method to create a Writer of the specified type

Parameters
  • name (str) –

  • kwargs (Any) –

Return type

WriterWrapper