whylogs.api.writer.whylabs
#
Module Contents#
Classes#
Attributes#
- whylogs.api.writer.whylabs.FIVE_MINUTES_IN_SECONDS#
- whylogs.api.writer.whylabs.DAY_IN_SECONDS#
- whylogs.api.writer.whylabs.FIVE_YEARS_IN_SECONDS#
- whylogs.api.writer.whylabs.logger#
- whylogs.api.writer.whylabs.KNOWN_CUSTOM_PERFORMANCE_METRICS#
- class whylogs.api.writer.whylabs.WhyLabsWriter(org_id: Optional[str] = None, api_key: Optional[str] = None, dataset_id: Optional[str] = None, api_client: Optional[whylabs_client.ApiClient] = None, ssl_ca_cert: Optional[str] = None, _timeout_seconds: Optional[float] = None)#
Bases:
whylogs.api.writer.Writer
- Parameters
- option(org_id: Optional[str] = None, dataset_id: Optional[str] = None, api_key: Optional[str] = None, reference_profile_name: Optional[str] = None, configuration: Optional[whylabs_client.Configuration] = None, ssl_ca_cert: Optional[str] = None, api_client: Optional[whylabs_client.ApiClient] = None, timeout_seconds: Optional[float] = None) WhyLabsWriter #
- Parameters
ID (org_id the organization) –
Id (dataset_id the dataset) –
key (api_key the API) –
profile (reference_profile_name the name of the reference) –
client (configuration the additional configuration for the REST) –
configured (Returns a "WhyLabsWriter" with these options) –
------- –
org_id (Optional[str]) –
dataset_id (Optional[str]) –
api_key (Optional[str]) –
reference_profile_name (Optional[str]) –
configuration (Optional[whylabs_client.Configuration]) –
ssl_ca_cert (Optional[str]) –
api_client (Optional[whylabs_client.ApiClient]) –
timeout_seconds (Optional[float]) –
- Return type
- tag_output_columns(columns: List[str]) Tuple[bool, str] #
Sets the list of columns as output columns for the specified dataset.
- tag_input_columns(columns: List[str]) Tuple[bool, str] #
Sets the list of columns as input columns for the specified dataset.
- tag_custom_performance_column(column: str, label: Optional[str] = None, default_metric: str = 'mean') Tuple[bool, str] #
Sets the column as a custom performance metric for the specified dataset and org id. The default metric will be displayed in the Performance tab in WhyLabs.
- Parameters
column (str) – The column name in the whylogs profile you want to tag as a custom performance metric.
label (str) – The label that will be displayed in WhyLabs UI. If none is passed, defaults to column name.
default_metric (str) – The default metric that will be displayed in the Performance tab in WhyLabs. For example, “mean”, “median”, “max”, or “min”. If none is passed, defaults to “mean”.
Note (the resulting custom performance metric is considered an unmergeable metric.) –
- Return type
- write_estimation_result(file: whylogs.experimental.performance_estimation.estimation_results.EstimationResult, **kwargs: Any) Tuple[bool, str] #
- Parameters
file (whylogs.experimental.performance_estimation.estimation_results.EstimationResult) –
kwargs (Any) –
- Return type
- write_feature_weights(file: whylogs.core.feature_weights.FeatureWeights, **kwargs: Any) Tuple[bool, str] #
Put feature weights for the specified dataset.
- Parameters
file (FeatureWeights) – FeatureWeights object representing the Feature Weights for the specified dataset
kwargs (Any) –
- Returns
Tuple with a boolean (1-success, 0-fail) and string with the request’s status code.
- Return type
- get_feature_weights(**kwargs: Any) Optional[whylogs.core.feature_weights.FeatureWeights] #
Get latest version for the feature weights for the specified dataset
- Returns
Response of the GET request, with segmentWeights and metadata.
- Return type
FeatureWeightResponse
- Parameters
kwargs (Any) –
- write(file: whylogs.api.writer.writer.Writable, **kwargs: Any) Tuple[bool, str] #
- Parameters
file (whylogs.api.writer.writer.Writable) –
kwargs (Any) –
- Return type