whylogs.api.logger.result_set
#
Module Contents#
Classes#
A holder object for profiling results. |
|
A holder object for profiling results. |
|
A holder object for profiling results. |
|
A holder object for profiling results. |
Attributes#
- whylogs.api.logger.result_set.logger#
- class whylogs.api.logger.result_set.ResultSetReader(reader: whylogs.api.reader.Reader)#
- Parameters
reader (whylogs.api.reader.Reader) –
- option(**kwargs: Any) ResultSetReader #
- Parameters
kwargs (Any) –
- Return type
- class whylogs.api.logger.result_set.ResultSet#
Bases:
whylogs.api.writer.writer._Writable
,abc.ABC
A holder object for profiling results.
A whylogs.log call can result in more than one profile. This wrapper class simplifies the navigation among these profiles.
Note that currently we only hold one profile but we’re planning to add other kinds of profiles such as segmented profiles here.
- property performance_metrics: Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]#
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- static reader(name: str = 'local') ResultSetReader #
- Parameters
name (str) –
- Return type
- abstract view() Optional[whylogs.core.DatasetProfileView] #
- Return type
Optional[whylogs.core.DatasetProfileView]
- abstract profile() Optional[whylogs.core.DatasetProfile] #
- Return type
Optional[whylogs.core.DatasetProfile]
- get_writables() Optional[List[whylogs.api.writer.writer._Writable]] #
- Return type
Optional[List[whylogs.api.writer.writer._Writable]]
- set_dataset_timestamp(dataset_timestamp: datetime.datetime) None #
- Parameters
dataset_timestamp (datetime.datetime) –
- Return type
- add_model_performance_metrics(metrics: whylogs.core.model_performance_metrics.ModelPerformanceMetrics) None #
- Parameters
metrics (whylogs.core.model_performance_metrics.ModelPerformanceMetrics) –
- Return type
- add_metric(name: str, metric: whylogs.core.metrics.metrics.Metric) None #
- Parameters
name (str) –
metric (whylogs.core.metrics.metrics.Metric) –
- Return type
- class whylogs.api.logger.result_set.ViewResultSet(view: whylogs.core.DatasetProfileView)#
Bases:
ResultSet
A holder object for profiling results.
A whylogs.log call can result in more than one profile. This wrapper class simplifies the navigation among these profiles.
Note that currently we only hold one profile but we’re planning to add other kinds of profiles such as segmented profiles here.
- Parameters
view (whylogs.core.DatasetProfileView) –
- property performance_metrics: Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]#
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- profile() Optional[whylogs.core.DatasetProfile] #
- Return type
Optional[whylogs.core.DatasetProfile]
- view() Optional[whylogs.core.DatasetProfileView] #
- Return type
Optional[whylogs.core.DatasetProfileView]
- static zero() ViewResultSet #
- Return type
- merge(other: ResultSet) ViewResultSet #
- Parameters
other (ResultSet) –
- Return type
- set_dataset_timestamp(dataset_timestamp: datetime.datetime) None #
- Parameters
dataset_timestamp (datetime.datetime) –
- Return type
- static reader(name: str = 'local') ResultSetReader #
- Parameters
name (str) –
- Return type
- get_writables() Optional[List[whylogs.api.writer.writer._Writable]] #
- Return type
Optional[List[whylogs.api.writer.writer._Writable]]
- add_model_performance_metrics(metrics: whylogs.core.model_performance_metrics.ModelPerformanceMetrics) None #
- Parameters
metrics (whylogs.core.model_performance_metrics.ModelPerformanceMetrics) –
- Return type
- add_metric(name: str, metric: whylogs.core.metrics.metrics.Metric) None #
- Parameters
name (str) –
metric (whylogs.core.metrics.metrics.Metric) –
- Return type
- class whylogs.api.logger.result_set.ProfileResultSet(profile: whylogs.core.DatasetProfile)#
Bases:
ResultSet
A holder object for profiling results.
A whylogs.log call can result in more than one profile. This wrapper class simplifies the navigation among these profiles.
Note that currently we only hold one profile but we’re planning to add other kinds of profiles such as segmented profiles here.
- Parameters
profile (whylogs.core.DatasetProfile) –
- property performance_metrics: Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]#
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- profile() Optional[whylogs.core.DatasetProfile] #
- Return type
Optional[whylogs.core.DatasetProfile]
- view() Optional[whylogs.core.DatasetProfileView] #
- Return type
Optional[whylogs.core.DatasetProfileView]
- static zero() ProfileResultSet #
- Return type
- merge(other: ResultSet) ViewResultSet #
- Parameters
other (ResultSet) –
- Return type
- static reader(name: str = 'local') ResultSetReader #
- Parameters
name (str) –
- Return type
- get_writables() Optional[List[whylogs.api.writer.writer._Writable]] #
- Return type
Optional[List[whylogs.api.writer.writer._Writable]]
- set_dataset_timestamp(dataset_timestamp: datetime.datetime) None #
- Parameters
dataset_timestamp (datetime.datetime) –
- Return type
- add_model_performance_metrics(metrics: whylogs.core.model_performance_metrics.ModelPerformanceMetrics) None #
- Parameters
metrics (whylogs.core.model_performance_metrics.ModelPerformanceMetrics) –
- Return type
- add_metric(name: str, metric: whylogs.core.metrics.metrics.Metric) None #
- Parameters
name (str) –
metric (whylogs.core.metrics.metrics.Metric) –
- Return type
- class whylogs.api.logger.result_set.SegmentedResultSet(segments: Dict[str, Dict[whylogs.core.Segment, Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]]], partitions: Optional[List[whylogs.core.segmentation_partition.SegmentationPartition]] = None, metrics: Optional[Dict[str, Any]] = None, properties: Optional[Dict[str, Any]] = None)#
Bases:
ResultSet
A holder object for profiling results.
A whylogs.log call can result in more than one profile. This wrapper class simplifies the navigation among these profiles.
Note that currently we only hold one profile but we’re planning to add other kinds of profiles such as segmented profiles here.
- Parameters
segments (Dict[str, Dict[whylogs.core.Segment, Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]]]) –
partitions (Optional[List[whylogs.core.segmentation_partition.SegmentationPartition]]) –
metrics (Optional[Dict[str, Any]]) –
properties (Optional[Dict[str, Any]]) –
- property partitions: Optional[List[whylogs.core.segmentation_partition.SegmentationPartition]]#
- Return type
Optional[List[whylogs.core.segmentation_partition.SegmentationPartition]]
- property model_performance_metric: Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]#
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- property performance_metrics: Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]#
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- profile(segment: Optional[whylogs.core.Segment] = None) Optional[Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]] #
- Parameters
segment (Optional[whylogs.core.Segment]) –
- Return type
Optional[Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]]
- get_writables() Optional[List[whylogs.api.writer.writer._Writable]] #
- Return type
Optional[List[whylogs.api.writer.writer._Writable]]
- get_whylabs_tags() List[whylabs_client.model.segment_tag.SegmentTag] #
- Return type
List[whylabs_client.model.segment_tag.SegmentTag]
- get_timestamps() List[Optional[datetime.datetime]] #
- Return type
List[Optional[datetime.datetime]]
- set_dataset_timestamp(dataset_timestamp: datetime.datetime) None #
- Parameters
dataset_timestamp (datetime.datetime) –
- Return type
- segments(restrict_to_parition_id: Optional[str] = None) Optional[List[whylogs.core.Segment]] #
- Parameters
restrict_to_parition_id (Optional[str]) –
- Return type
Optional[List[whylogs.core.Segment]]
- segments_in_partition(partition: whylogs.core.segmentation_partition.SegmentationPartition) Optional[Dict[whylogs.core.Segment, Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]]] #
- Parameters
partition (whylogs.core.segmentation_partition.SegmentationPartition) –
- Return type
Optional[Dict[whylogs.core.Segment, Union[whylogs.core.DatasetProfile, whylogs.core.DatasetProfileView]]]
- view(segment: Optional[whylogs.core.Segment] = None) Optional[whylogs.core.DatasetProfileView] #
- Parameters
segment (Optional[whylogs.core.Segment]) –
- Return type
Optional[whylogs.core.DatasetProfileView]
- get_model_performance_metrics_for_segment(segment: whylogs.core.Segment) Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics] #
- Parameters
segment (whylogs.core.Segment) –
- Return type
Optional[whylogs.core.model_performance_metrics.ModelPerformanceMetrics]
- add_metrics_for_segment(metrics: whylogs.core.model_performance_metrics.ModelPerformanceMetrics, segment: whylogs.core.Segment) None #
- Parameters
metrics (whylogs.core.model_performance_metrics.ModelPerformanceMetrics) –
segment (whylogs.core.Segment) –
- Return type
- static zero() SegmentedResultSet #
- Return type
- add_model_performance_metrics(metrics: whylogs.core.model_performance_metrics.ModelPerformanceMetrics) None #
- Parameters
metrics (whylogs.core.model_performance_metrics.ModelPerformanceMetrics) –
- Return type
- add_metric(name: str, metric: whylogs.core.metrics.metrics.Metric) None #
- Parameters
name (str) –
metric (whylogs.core.metrics.metrics.Metric) –
- Return type
- merge(other: ResultSet) SegmentedResultSet #
- Parameters
other (ResultSet) –
- Return type
- static reader(name: str = 'local') ResultSetReader #
- Parameters
name (str) –
- Return type
- whylogs.api.logger.result_set.ResultSetWriter#