Instantiate whylogs Logger from params.
from_params(
cls,
*,
api_key: Optional[str] = None,
org_id: Optional[str] = None,
dataset_id: Optional[str] = None,
sentiment: bool = False,
toxicity: bool = False,
themes: bool = False,
logger: Optional[Logger] = None
) -> WhyLabsCallbackHandler| Name | Type | Description |
|---|---|---|
api_key | Optional[str] | Default: NoneWhyLabs API key. Optional because the preferred way to specify the API key is with environment variable WHYLABS_API_KEY. |
org_id | Optional[str] | Default: NoneWhyLabs organization id to write profiles to. If not set must be specified in environment variable WHYLABS_DEFAULT_ORG_ID. |
dataset_id | Optional[str] | Default: NoneThe model or dataset this callback is gathering telemetry for. If not set must be specified in environment variable WHYLABS_DEFAULT_DATASET_ID. |
sentiment | bool | Default: FalseIf True will initialize a model to perform sentiment analysis compound score. Defaults to False and will not gather this metric. |
toxicity | bool | Default: FalseIf True will initialize a model to score toxicity. Defaults to False and will not gather this metric. |
themes | bool | Default: FalseIf True will initialize a model to calculate distance to configured themes. Defaults to None and will not gather this metric. |
logger | Optional[Logger] | Default: NoneIf specified will bind the configured logger as the telemetry gathering agent. Defaults to LangKit schema with periodic WhyLabs writer. |