Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
wyvern entity doc update (#45)
Browse files Browse the repository at this point in the history
* wyvern entity doc update

* get_historical_features doc update

* update WyvernEntity docstring
  • Loading branch information
wintonzheng authored Sep 8, 2023
1 parent 416e082 commit 148254e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 2 additions & 10 deletions wyvern/entities/identifier_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,8 @@ def nested_hydration(self) -> Dict[str, str]:

class WyvernEntity(WyvernDataModel):
"""
WyvernEntity is a base class for all entities that have primary identifier
TODO:
we want to design a way to so that
1. the primary key of the entity could map to the name of the entity
2. it's easy to define the relation
example:
have a @wyvern_entity decorator that could be used to define the primary key name
and identifier type
@wyvenr_entity(key="product_id", type="product")
WyvernEntity is a base class for all entities that have primary identifier.
An entity is the basic unit of data that could be indexed and queried.
"""

_identifier: Identifier = PrivateAttr()
Expand Down
4 changes: 4 additions & 0 deletions wyvern/feature_store/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ async def get_historical_features(
Arguments:
data: Request data. See schemas.py for the schema.
data.entities: entities must contain two required columns, request and timestamp.
Besides the required columns, it contains all the entity columns (product, query, etc.),
as well as the extra feature data columns (like is_purchased, is_clicked, etc.).
Returns:
Historical features response.
"""
Expand Down

0 comments on commit 148254e

Please sign in to comment.