Skip to content

Commit

Permalink
Add example policy that shows how to configure callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
naddeoa committed Feb 12, 2024
1 parent fffc86a commit 35efd33
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/configure_container_yaml/local.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ DEFAULT_WHYLABS_DATASET_CADENCE=DAILY
# Upload profiles every five minutes
DEFAULT_WHYLABS_UPLOAD_CADENCE=M
DEFAULT_WHYLABS_UPLOAD_INTERVAL=5

26 changes: 26 additions & 0 deletions examples/configure_container_yaml/whylogs_config/model-150.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 35efd33

Please sign in to comment.