Model Data Logging - Quick User Guide
Please contact Verta at help@verta.ai to set up model data logging in your system.
Quick guide to logging data during model predictions.
Verta’s Model Data Logging capability allows users to log arbitrary key-value pairs, with the key being a string and the value being any JSON-compatible object, during model predictions and have those logs stored in a data-lake compatible format.
See the complete, comprehensive guide HERE
Basics
The verta.runtime.log() python client API is inserted within the scope of a model's predict() method with the format
verta.runtime.log('alphanumeric_string', <Any JSON Compatible object>
)Logs are collected during the prediction and written to S3 after results are returned to the requestor.
prediction_id
is logged by default.
Best Practices
Keep your logs as simple as possible with individual key-value pairs.
Don't share keys across models unless they are the same data type.
The Code
Given a prediction:
Output:
"ROAR!!!"
Resulting log file will contain:
Locally inspect logs produced by your model by wrapping calls to predict()
inside an instance of verta.runtime.context() and printing the logs.
Output:
{'model_input': 'yell', 'model_output': 'YELL!!!'}
Note: verta_prediction_id
is not included in the sample output as it is only logged when an actual prediction is made against a live model.
---
Viewing the Logs
Logs are stored as JSON objects in S3 and should be immediately available for access at the following location:
s3://vertaai-model-data-logging/logs/date=YYYY-MM-DD/endpoint_id=XXX/<prediction_id>.json
Last updated