Skip to content

Commit

Permalink
Add detailed status docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vatj committed Jul 1, 2024
1 parent a75c5b4 commit 07a370b
Showing 1 changed file with 127 additions and 9 deletions.
136 changes: 127 additions & 9 deletions docs/user_guides/fs/feature_view/feature-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ In Hopsworks 3.7, we introduced a python client for the Online Store REST API Se
"metadataOptions": {
"featureName": true,
"featureType": true
},
"options": {
"validatePassedFeatures": true,
"includeDetailedStatus": true
}
}
```
Expand All @@ -46,6 +50,7 @@ featureViewVersion | number(int) |
entries | objects | Map of serving key of feature view as key and value of serving key as value. Serving key are a set of the primary key of feature groups which are included in the feature view query. If feature groups are joint with prefix, the primary key needs to be attached with prefix.
passedFeatures | objects | Optional. Map of feature name as key and feature value as value. This overwrites feature values in the response.
metadataOptions | objects | Optional. Map of metadataoption as key and boolean as value. Default metadata option is false. Metadata is returned on request. Metadata options available: 1\. featureName 2\. featureType |
options | objects | Optional. Map of option as key and boolean as value. Default option is false. Options available: 1\. validatePassedFeatures 2\. includeDetailedStatus

### Response

Expand Down Expand Up @@ -75,7 +80,17 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
"featureType": "string"
}
],
"status": "COMPLETE"
"status": "COMPLETE",
"detailedStatus": [
{
"featureGroupId": 1,
"httpStatus": 200,
},
{
"featureGroupId": 2,
"httpStatus": 200,
},
]
}
```

Expand Down Expand Up @@ -124,6 +139,66 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
}
```

**Detailed Status**

If `includeDetailedStatus` option is set to true, detailed status is returned in the response. Detailed status is a list of feature group id and http status code, corresponding to each read operations perform internally by RonDB. Meaning is as follows:

- `featureGroupId`: Id of the feature group, used to identify which table the operation correspond from.
- `httpStatus`: Http status code of the operation.
* 200 means success
* 400 means bad request, likely pk name is wrong or pk is incomplete. In particular, if pk for this table/feature group is not provided in the request, this http status is returned.
* 404 means no row corresponding to PK
* 500 means internal error.

Both `404` and `400` set the status to `MISSING` in the response. Examples below corresponds respectively to missing row and bad request.


Missing Row: The pk name,value was correctly passed but the corresponding row was not found in the feature group.
```
{
"features": [
36,
"2022-01-24",
null,
null
],
"status": "MISSING",
"detailedStatus": [
{
"featureGroupId": 1,
"httpStatus": 200,
},
{
"featureGroupId": 2,
"httpStatus": 404,
},
]
}
```

Bad Request e.g pk name,value pair for FG2 not provided or the corresponding column names was incorrect.
```
{
"features": [
36,
"2022-01-24",
null,
null
],
"status": "MISSING",
"detailedStatus": [
{
"featureGroupId": 1,
"httpStatus": 200,
},
{
"featureGroupId": 2,
"httpStatus": 400,
},
]
}
```

## Batch feature vectors

### Request
Expand Down Expand Up @@ -159,6 +234,10 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
"metadataOptions": {
"featureName": true,
"featureType": true
},
"options": {
"validatePassedFeatures": true,
"includeDetailedStatus": true
}
}
```
Expand All @@ -173,11 +252,13 @@ featureViewVersion | number(int) |
entries | `array<objects>` | Each items is a map of serving key as key and value of serving key as value. Serving key of feature view.
passedFeatures | `array<objects>` | Optional. Each items is a map of feature name as key and feature value as value. This overwrites feature values in the response. If provided, its size and order has to be equal to the size of entries. Item can be null.
metadataOptions | objects | Optional. Map of metadataoption as key and boolean as value. Default metadata option is false. Metadata is returned on request. Metadata options available: 1\. featureName 2\. featureType
options | objects | Optional. Map of option as key and boolean as value. Default option is false. Options available: 1\. validatePassedFeatures 2\. includeDetailedStatus

### Response

```
{
{
"features": [
[
16,
Expand All @@ -193,9 +274,9 @@ metadataOptions | objects | Optional. Map of metadataoption as key a
],
[
71,
"2022-01-22",
"int3",
"str97"
null,
null,
null
],
[
48,
Expand Down Expand Up @@ -231,9 +312,31 @@ metadataOptions | objects | Optional. Map of metadataoption as key a
"status": [
"COMPLETE",
"COMPLETE",
"COMPLETE",
"MISSING",
"COMPLETE",
"COMPLETE"
],
"detailedStatus": [
[{
"featureGroupId": 1,
"httpStatus": 200,
}],
[{
"featureGroupId": 1,
"httpStatus": 200,
}],
[{
"featureGroupId": 1,
"httpStatus": 404,
}],
[{
"featureGroupId": 1,
"httpStatus": 200,
}],
[{
"featureGroupId": 1,
"httpStatus": 200,
}]
]
}
```
Expand All @@ -246,6 +349,7 @@ note: Order of the returned features are the same as the order of entries in the
-------- | ------------------------------------- | ------------------------------------
200 | |
400 | Requested metadata does not exist |
404 | Missing row corresponding to pk value |
401 | Access denied | Access unshared feature store failed
500 | Failed to read feature store metadata |

Expand All @@ -263,16 +367,30 @@ note: Order of the returned features are the same as the order of entries in the
null,
[
51,
"id51",
"2022-01-10 00:00:00",
49
null,
null,
null,
]
],
"metadata": null,
"status": [
"COMPLETE",
"ERROR",
"COMPLETE"
"MISSING"
],
"detailedStatus": [
[{
"featureGroupId": 1,
"httpStatus": 200,
}],
[{
"featureGroupId": 1,
"httpStatus": 400,
}],
[{
"featureGroupId": 1,
"httpStatus": 404,
}]
]
}
```
Expand Down

0 comments on commit 07a370b

Please sign in to comment.