Wyvern has a standardized way of logging events that’s useful either for debugging, observability and training/improving your models. Here are the events wyvern records:
Event Type | Explanation | Data Being Logged |
---|---|---|
Candidate event | Wyvern records each candidate passed into Wyvern from it’s caller. | 1. The entity id (ie product_id) 2. The entity score (from your search, OpenSearch or algolia) 3. The candidate order (from from your search) |
Feature event | Wyvern records each feature generated for the purposes of evaluating model | 1. The entity id (ie product_id) 2. The feature identifier (ie what entity the feature corresponds to.. for example the entity’s brand, or query:product) 3. feature name 4. feature value |
Model event | Wyvern records the model scores for each candidate. This includes the actual predictions for each model that’s evaluated, including the ensembling of multiple models | 1. The entity id 2. The model source 3. The model generated score |
Business logic event | Wyvern records each candidate which had business logic applied to it. whether the ML model results was modified or not and what was change was) | 1. The entity id (ie product_id) 2. The business logic application source 3. The original candidate score 4. The adjusted candidate score |
Impression event | Wyvern records the final scores for each candidate, after it has gone through Model Scoring and Business logic pipelines | 1. Impression id 2. Impression type 3. Impression order (this will be 0 for non-ranking situations) 4. Impression score |
Custom event | Wyvern records your custom event data. See Custom Logging to see how to build a custom event log | 1. The custom entity id 2. The custom entity identifier type 3. custom data |
Here’s an example of how to log custom event data within Wyvern:
import the EntityEventData
and build your custom entity event data like the EmailEventData
in this exampl
e
import event_logger
from wyvern.components.events.events
and call event_logger.log_custom_events
to log your custom event
s
By default, event logging is always enabled. This might cause error if you have not set up your event logging integration. To disable Wyvern event logging, set the EVENT_LOGGING_ENABLED=false
in your environment.
Currently wyvern is only integrated with AWS kinesis, which sends all the events to your destination.
Steps to set up kinesis with Wyvern:
Use snowpipe to auto ingest wyvern’s events to your data warehouse.
Wyvern provides a built-in transformer to transform the raw event logs into event tables show in this page.