From 35efd33de37162343f057b28550c05584e2bb9ae Mon Sep 17 00:00:00 2001 From: Anthony Naddeo Date: Sun, 11 Feb 2024 20:18:57 -0800 Subject: [PATCH] Add example policy that shows how to configure callbacks --- examples/configure_container_yaml/local.env | 1 + .../whylogs_config/model-150.yaml | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 examples/configure_container_yaml/whylogs_config/model-150.yaml diff --git a/examples/configure_container_yaml/local.env b/examples/configure_container_yaml/local.env index 6aa1abc..36b3043 100644 --- a/examples/configure_container_yaml/local.env +++ b/examples/configure_container_yaml/local.env @@ -7,3 +7,4 @@ DEFAULT_WHYLABS_DATASET_CADENCE=DAILY # Upload profiles every five minutes DEFAULT_WHYLABS_UPLOAD_CADENCE=M DEFAULT_WHYLABS_UPLOAD_INTERVAL=5 + diff --git a/examples/configure_container_yaml/whylogs_config/model-150.yaml b/examples/configure_container_yaml/whylogs_config/model-150.yaml new file mode 100644 index 0000000..15a149b --- /dev/null +++ b/examples/configure_container_yaml/whylogs_config/model-150.yaml @@ -0,0 +1,26 @@ +id: 9294f3fa-4f4b-4363-9397-87d3499fce28 +policy_version: 1 +schema_version: 1 +whylabs_dataset_id: model-150 + +metrics: + - metric: prompt.sentiment_polarity + validation: + lower_threshold: 0.0 + + - metric: prompt.char_count + validation: + upper_threshold: 200 + lower_threshold: 2 + + - metric: response.sentiment_polarity + validation: + lower_threshold: 0.8 + +callbacks: + - callback: static_bearer_auth_validation_failure + options: + url: http://host.docker.internal:8001/failures + auth_token: password + include_input: true +