Feedback Loops
You can configure a Feedback Loop to collect all of the requests and responses that go through their deployed model endpoint and store them in a database of your choice. Additionally, all deployment and model metadata are collected and stored.
To create this Feedback Loop, you must select a database to send the data to when deploying a model. The following database types are supported for Feedback Loops:
-
PostgreSQL
-
Oracle
-
Microsoft SQL Server
Once the deployment is made, all requests, responses, and model and deployment metadata will be collected and stored in the selected database.
Note:
-
For Oracle databases, when setting up the Internal Connection in the platform, you must set the database name as "?service_name=YOUR_DATABASE_NAME"
Feedback Loop Database Settings
To collect the data for Feedback Loops, your database should be properly configured. In particular, the database must contain two tables: mlops_metadata and mlops_payload. The schema for these tables is shown below.
mlops_metadata
Column Name |
Data Type |
Not Null |
Auto Increment |
Key |
Default |
deployment_id |
12 |
text |
FALSE |
FALSE |
[NULL] |
deployment_name |
13 |
text |
FALSE |
FALSE |
[NULL] |
deployment_namespace |
14 |
text |
FALSE |
FALSE |
[NULL] |
deployment_type |
17 |
text |
FALSE |
FALSE |
[NULL] |
model_description |
11 |
text |
FALSE |
FALSE |
[NULL] |
model_id |
1 |
text |
FALSE |
FALSE |
[NULL] |
model_label |
3 |
varchar(255) |
FALSE |
FALSE |
[NULL] |
model_metadata |
6 |
text |
FALSE |
FALSE |
[NULL] |
model_name |
2 |
text |
FALSE |
FALSE |
[NULL] |
model_package_type |
9 |
text |
FALSE |
FALSE |
[NULL] |
model_package_version |
8 |
text |
FALSE |
FALSE |
[NULL] |
model_prediction_type |
7 |
text |
FALSE |
FALSE |
[NULL] |
model_predictor_unit |
4 |
text |
FALSE |
FALSE |
[NULL] |
model_registry |
16 |
text |
FALSE |
FALSE |
[NULL] |
model_uri |
5 |
text |
FALSE |
FALSE |
[NULL] |
model_version |
10 |
text |
FALSE |
FALSE |
[NULL] |
timestamp |
15 |
datetime |
FALSE |
FALSE |
[NULL] |
mlops_payload
Column Name |
Data Type |
Not Null |
Auto Increment |
Key |
Default |
deployment_id |
3 |
text |
FALSE |
FALSE |
[NULL] |
deployment_name |
4 |
text |
FALSE |
FALSE |
[NULL] |
model_id |
2 |
text |
FALSE |
FALSE |
[NULL] |
model_name |
5 |
text |
FALSE |
FALSE |
[NULL] |
namespace |
7 |
text |
FALSE |
FALSE |
[NULL] |
predictor_unit |
6 |
text |
FALSE |
FALSE |
[NULL] |
request_ce_trace_parent |
10 |
text |
FALSE |
FALSE |
[NULL] |
request_content_length |
9 |
int(11) |
FALSE |
FALSE |
[NULL] |
request_id |
1 |
varchar(255) |
TRUE |
FALSE |
PRI |
request_payload |
8 |
text |
FALSE |
FALSE |
[NULL] |
request_timestamp |
12 |
timestamp |
FALSE |
FALSE |
[NULL] |
request_trace_id |
13 |
text |
FALSE |
FALSE |
[NULL] |
request_trace_parent |
11 |
text |
FALSE |
FALSE |
[NULL] |
response_ce_trace_parent |
16 |
text |
FALSE |
FALSE |
[NULL] |
response_content_length |
15 |
int(11) |
FALSE |
FALSE |
[NULL] |
response_payload |
14 |
text |
FALSE |
FALSE |
[NULL] |
response_timestamp |
18 |
timestamp |
FALSE |
FALSE |
[NULL] |
response_trace_id |
19 |
text |
FALSE |
FALSE |
[NULL] |
response_trace_parent |
17 |
text |
FALSE |
FALSE |
[NULL] |
Notes
-
For Microsoft SQL Server databases, the required datatypes are slightly different:
-
request_payload has type NVARCHAR(MAX)
-
response_payload has type NVARCHAR(MAX)
-
For Oracle databases, there are two additional required columns:
-
request_payload_large with type NCLOB
-
response_payload_large with type NCLOB