Skip to content

Commit

Permalink
Add ensembling request schema to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Mar 11, 2022
1 parent 896a5da commit 2886639
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions sdk/docs/how-to/build-ensemblers/01-pyfunc-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,39 @@ def ensemble(
else:
result = ['treatment-a', 'control']
return "-ensembled-with-".join(result)
```

You may wish to note that a general request sent to an ensembler by a Turing Router has a schema
that looks like the following:

```json
{
// original request payload unmodified
"request":{},
"response": {
"route_responses": [
{
"route": "control",
"data": {
//...
},
"is_default": true
},
{
"route": "xgboost-ordinal",
"data": {
//...
}
},
],
"experiment": {
// response from Experiment Engine unmodified
"configuration": {
//...
},
// populated if error occurs
"error": "",
}
}
}
```

0 comments on commit 2886639

Please sign in to comment.