wyvern
wyvern.clients
wyvern.clients.snowflake
generate_snowflake_ctx
wyvern.service
WyvernService Objects
host
- The host to run the service on. Defaults to localhost.port
- The port to run the service on. Defaults to 5000.
register_routes
route_components
- The list of route components to register
generate
route_components
- The list of route components to register. Defaults to None.realtime_feature_components
- The list of realtime feature components to register. Defaults to None.host
- The host to run the service on. Defaults to localhost.port
- The port to run the service on. Defaults to 5000.
WyvernService
- The generated Wyvern service
run
route_components
- The list of route components to registerrealtime_feature_components
- The list of realtime feature components to register. Defaults to None.host
- The host to run the service on. Defaults to localhost.port
- The port to run the service on. Defaults to 5000.
generate_app
route_components
- The list of route components to register. Defaults to None.realtime_feature_components
- The list of realtime feature components to register. Defaults to None.host
str, optional - The host to run the service on. Defaults to localhost.port
int, optional - The port to run the service on. Defaults to 5000.
FastAPI
- The generated FastAPI app
wyvern.config
Settings Objects
-
ENVIRONMENT
- The environment the service is running in. Default todevelopment
. -
PROJECT_NAME
- The name of the project. Default todefault
. -
REDIS_HOST
- The host of the redis instance. Default tolocalhost
. -
REDIS_PORT
- The port of the redis instance. Default to6379
. -
WYVERN_API_KEY
- The API key for the Wyvern API. Default to""
, empty string. -
WYVERN_BASE_URL
- The base url of the Wyvern API. Default tohttps://api.wyvern.ai
WYVERN_ONLINE_FEATURES_PATH: The path to the online features endpoint. Default to/feature/get-online-features
. WYVERN_HISTORICAL_FEATURES_PATH: The path to the historical features endpoint. Default to/feature/get-historical-features
. -
WYVERN_FEATURE_STORE_URL
- The url of the Wyvern feature store. Default tohttps://api.wyvern.ai
. -
SNOWFLAKE_ACCOUNT
- The account name of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_USER
- The username of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_PASSWORD
- The password of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_ROLE
- The role of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_WAREHOUSE
- The warehouse of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_DATABASE
- The database of the Snowflake instance. Default to""
, empty string. -
SNOWFLAKE_OFFLINE_STORE_SCHEMA
- The schema of the Snowflake instance. Default toPUBLIC
. -
AWS_ACCESS_KEY_ID
- The access key id for the AWS instance. Default to""
, empty string. -
AWS_SECRET_ACCESS_KEY
- The secret access key for the AWS instance. Default to""
, empty string. -
AWS_REGION_NAME
- The region name for the AWS instance. Default tous-east-1
. -
FEATURE_STORE_TIMEOUT
- The timeout for the feature store. Default to60
seconds. -
SERVER_TIMEOUT
- The timeout for the server. Default to60
seconds. -
REDIS_BATCH_SIZE
- The batch size for the redis instance. Default to100
. -
WYVERN_INDEX_VERSION
- The version of the Wyvern index. Default to1
. -
MODELBIT_BATCH_SIZE
- The batch size for the modelbit. Default to30
. -
EXPERIMENTATION_ENABLED
- Whether experimentation is enabled. Default toFalse
. -
EXPERIMENTATION_PROVIDER
- The experimentation provider. Default toExperimentationProvider.EPPO.value
. -
EPPO_API_KEY
- The API key for EPPO (an experimentation provider). Default to""
, empty string. -
FEATURE_STORE_ENABLED
- Whether the feature store is enabled. Default toTrue
. -
EVENT_LOGGING_ENABLED
- Whether event logging is enabled. Default toTrue
.
wyvern.core.compression
wyvern_encode
wyvern_decode
wyvern.core
wyvern.core.http
AiohttpClientWrapper Objects
start
stop
__call__
aiohttp_client
The aiohttp client singleton. Use this to make requests. Example:wyvern.experimentation.experimentation_logging
ExperimentationEventData Objects
experiment_id
- The experiment id.entity_id
- The entity id.result
- The result of the experiment. Can be None.timestamp
- The timestamp of the event.metadata
- The metadata of the event such as targeting parameters etc.has_error
- Whether the request has errored or not.
ExperimentationEvent Objects
event_type
- The event type. This is always EventType.EXPERIMENTATION.
wyvern.experimentation.providers
wyvern.experimentation.providers.eppo_provider
EppoExperimentationClient Objects
- init() -> None
- get_result(experiment_id: str, entity_id: str, **kwargs) -> str
- log_result(experiment_id: str, entity_id: str, variant: str) -> None
get_result
- experiment_id (str): The unique ID of the experiment.
- entity_id (str): The unique ID of the entity (e.g., user or other subject).
- **kwargs: Additional arguments to be passed to the Eppo client’s get_assignment method.
- str: The assigned variant for the given experiment and entity.
log_result
- experiment_id (str): The unique ID of the experiment.
- entity_id (str): The unique ID of the entity.
- variant (str): The assigned variant for the given experiment and entity.
-
Note
- This method is overridden to do nothing because the assignment logger we set in Eppo already handles result logging upon assignment.
wyvern.experimentation.providers.base
ExperimentationProvider Objects
BaseExperimentationProvider Objects
get_result
- experiment_id (str): The unique ID of the experiment.
- entity_id (str): The unique ID of the entity.
- kwargs (dict): Any additional arguments to pass to the provider for targeting.
- str: The result (variant) assigned to the entity for the specified experiment.
log_result
- experiment_id (str): The unique ID of the experiment.
- entity_id (str): The unique ID of the entity.
- variant (str): The result (variant) assigned to the entity for the specified experiment.
- kwargs (dict): Any additional arguments to pass to the provider for targeting.
- None
wyvern.experimentation.client
ExperimentationClient Objects
__init__
- provider_name (str): The name of the experimentation provider (e.g., “eppo”).
get_experiment_result
- experiment_id (str): The unique ID of the experiment.
- entity_id (str): The unique ID of the entity.
- kwargs (dict): Any additional arguments to pass to the provider for targeting.
- str: The result (variant) assigned to the entity for the specified experiment.
wyvern.experimentation
wyvern.index
wyvern.request_context
current
ensure_current_request
RuntimeError
- If there is no current request context
set
request
- The request context to set
reset
wyvern.wyvern_typing
WyvernFeature
A WyvernFeature defines the type of a feature in Wyvern. It can be a float, a string, a list of floats, or None.wyvern.cli.commands
init
project
str - Name of the project
run
path
str - path to the wyvern app. Default path is pipelines.main:apphost
str - Host to run the application on. Default host is 0.0.0.0port
int - Port to run the application on. Default port is 5001
redis
wyvern.api
ensure_async_client
func
- The function to be wrapped
WyvernAPI Objects
get_historical_features
features
- A list of feature names.entities
- A dictionary or pandas DataFrame of entity names and their values. some requirements of entities:- entities must have request and timestamp keys
- request is a list of the request_id of request getting into Wyvern’s pipeline
- timestamp is a list of timestamp of the request
- the rest of the columns are the entity for the features and the user interaction data
wyvern.components.candidates
wyvern.components.candidates.candidate_logger
CandidateEventData Objects
candidate_score
- The score of the candidatecandidate_order
- The order of the candidate in the list of candidates
wyvern.components.pagination.pagination_component
PaginationRequest Objects
pagination_fields
- The pagination fields that are used to compute the pagination.entities
- The entities that need to be paginated.
PaginationComponent Objects
execute
- The ranking page should be greater than or equal to 0.
- The candidate page should be greater than or equal to 0.
- The candidate page size should be less than or equal to 1000.
- The number of entities should be less than or equal to 1000.
- The user page size should be less than or equal to 100.
- The user page size should be less than or equal to the candidate page size.
- The end index should be less than the number of entities.
- The end index should be greater than the start index.
wyvern.components.pagination
wyvern.components.pagination.pagination_fields
PaginationFields Objects
user_page_size
- Zero-indexed user facing page numberuser_page
- Number of items per user facing pagecandidate_page_size
- This is the size of the candidate page.candidate_page
- This is the zero-indexed page number for the candidate set
wyvern.components.features.realtime_features_component
PRIMARY_ENTITY
The primary entity is the entity that is the main entity for the feature. For example, if we are computing the feature for a user, the primary entity would be the user.SECONDARY_ENTITY
The secondary entity is the entity that is the secondary entity for the feature. For example, if we are computing the feature for a user and a product, the secondary entity would be the product. If we are computing the feature for a user, the secondary entity would be None.RealtimeFeatureRequest Objects
RealtimeFeatureEntity Objects
RealtimeFeatureComponent Objects
NAME
- The name of the realtime feature component. This is used to identify the realtime feature component.real_time_features
- A list of all the realtime feature components.component_registry
- A dictionary that maps the name of the realtime feature component to the realtime feature
__init__
name
: Name of the componentoutput_feature_names
: features outputted by this real-time feature
get_type_args_simple
get_entity_names
<component_name>:<feature_name>
get_entity_type_column
<component_name>:<feature_name>
can_execute_on
set_full_feature_name
wyvern.components.features.feature_store
FeatureStoreRetrievalRequest Objects
identifiers
- List of identifiers for which features are to be retrieved.feature_names
- List of feature names to be retrieved. Feature names are of the form<feature_view_name>:<feature_name>
.
FeatureStoreRetrievalComponent Objects
<feature_view_name>:<feature_name>
. The feature values are of type WyvernFeature
which is a union of all the possible feature types. The feature types are defined in wyvern/wyvern_typing.py
.
The FeatureStoreRetrievalComponent is a singleton and can be accessed via feature_store_retrieval_component
.
The FeatureStoreRetrievalComponent is configured via the following environment variables:
- WYVERN_API_KEY: if you’re using Wyvern’s feature store, this is the API key for Wyvern
- WYVERN_FEATURE_STORE_URL: url to the feature store
- WYVERN_ONLINE_FEATURES_PATH: url path to the feature store’s online features endpoint
- FEATURE_STORE_ENABLED: whether the feature store is enabled or not
fetch_features_from_feature_store
identifiers
- List of identifiers for which features are to be retrieved.feature_names
- List of feature names to be retrieved.
execute
fetch_features_from_feature_store
which handles exceptions and returns an empty FeatureMap in case of
an exception.
wyvern.components.features.feature_retrieval_pipeline
FeatureRetrievalPipelineRequest Objects
request
- The request that is used to retrieve features. This is used to retrieve the entities and identifiers that are needed to compute the features.requested_feature_names
- The feature names that are requested. This is used to filter out the real-time features that are calculated instead of retrieved from the feature store. ie:product_fv:FEATURE_PRODUCT_AMOUNT_PAID_LAST_15_DAYS
feature_overrides
- This is used to override the default real-time features.
FeatureRetrievalPipeline Objects
__init__
*upstreams
- The upstream components to this component.name
- The name of this component.handle_exceptions
- Whether to handle feature store exceptions. Defaults to False. If True, missing feature values will be None instead of raising exceptions. If False, exceptions will be raised.
execute
wyvern.components.features
wyvern.components.features.feature_logger
FeatureLogEventData Objects
feature_identifier
- The identifier of the feature.feature_identifier_type
- The type of the feature identifier.feature_name
- The name of the feature.feature_value
- The value of the feature.
FeatureEvent Objects
event_type
- The type of the event. Defaults to EventType.FEATURE.
FeatureEventLoggingRequest Objects
request
- The request to log feature events for.feature_map
- The feature map to log.
FeatureEventLoggingComponent Objects
execute
wyvern.components
wyvern.components.models.model_component
MODEL_OUTPUT_DATA_TYPE
MODEL_OUTPUT_DATA_TYPE is the type of the output of the model. It can be a float, a string, or a list of floats (e.g. a list of probabilities, embeddings, etc.)ModelEventData Objects
model_name
- The name of the modelmodel_output
- The output of the modelentity_identifier
- The identifier of the entity that was used to generate the model output. This is optional.entity_identifier_type
- The type of the identifier of the entity that was used to generate the model output. This is optional.
ModelEvent Objects
event_type
- The type of the event. This is always EventType.MODEL.
ModelOutput Objects
data
- A dictionary mapping entity identifiers to model outputs. The model outputs can also be None.model_name
- The name of the model. This is optional.
get_entity_output
identifier
- The identifier of the entity.
ModelInput Objects
request
- The request that will be used to generate the model input.entities
- A list of entities that will be used to generate the model input.
first_entity
first_identifier
ModelComponent Objects
get_type_args_simple
manifest_feature_names
execute
batch_inference
inference
wyvern.components.models
wyvern.components.models.modelbit_component
ModelbitComponent Objects
AUTH_TOKEN
- A class variable that stores the auth token for Modelbit.URL
- A class variable that stores the url for Modelbit.
__init__
*upstreams
- A list of upstream components.name
- A string that represents the name of the model.auth_token
- A string that represents the auth token for Modelbit.url
- A string that represents the url for Modelbit.
WyvernModelbitTokenMissingError
- If the auth token is not provided.
modelbit_features
manifest_feature_names
build_requests
inference
wyvern.components.api_route_component
APIRouteComponent Objects
API_VERSION
- the version of the API. This is used in the API routing. The default value is “v1”.PATH
- the path of the API. This is used in the API routing.REQUEST_SCHEMA_CLASS
- the class of the request schema. This is used to validate the request data.RESPONSE_SCHEMA_CLASS
- the class of the response schema. This is used to validate the response data.API_NAME
- the name of the API. This is used in the API routing. If not provided, the name of the APIRouteComponent will be used.
warm_up
hydrate
wyvern.components.business_logic.boosting_business_logic
BoostingBusinessLogicComponent Objects
boost
scored_candidates
- The list of scored candidatesentity_keys
- The set of entity keys (unique identifiers) to boostboost
- The boost factorentity_key_mapping
- A lambda function that takes in a candidate entity and returns the field we should apply the boost tomultiplicative
- Whether to apply the boost with multiplication or addition - true indicates it is multiplication and false indicates it is addition
CSVBoostingBusinessLogicComponent Objects
csv_file
- The path to the CSV filemultiplicative
- Whether to apply the boost with multiplication or addition - true indicates it is multiplication and false indicates it is addition
initialize
extract_keys_from_csv_row
extract_boost_value_from_csv_row
extract_key_from_request_entity
execute
wyvern.components.business_logic
wyvern.components.business_logic.business_logic
BusinessLogicEventData Objects
business_logic_pipeline_order
- The order of the business logic pipeline that this event occurred inbusiness_logic_name
- The name of the business logic component that this event occurred inold_score
- The old score of the entitynew_score
- The new score of the entity
BusinessLogicEvent Objects
BusinessLogicRequest Objects
request
- The request that the business logic layer is being asked to perform business logic onscored_candidates
- The candidates that the business logic layer is being asked to perform business logic on
BusinessLogicResponse Objects
request
- The request that the business logic layer was asked to perform business logic onadjusted_candidates
- The candidates that the business logic layer performed business logic on
BusinessLogicComponent Objects
BusinessLogicPipeline Objects
execute
input
- The input to the business logic pipeline
extract_business_logic_events
output
- The output of a business logic componentpipeline_index
- The index of the business logic component in the business logic pipelineupstream_name
- The name of the business logic componentrequest_id
- The request id of the request that the business logic component was called inold_scores
- The old scores of the candidates that the business logic component was called on
wyvern.components.business_logic.pinning_business_logic
PinningBusinessLogicComponent Objects
pin
scored_candidates
- The list of scored candidatesentity_pins
- The map of entity keys (unique identifiers) to pin, and their pinning positionentity_key_mapping
- A lambda function that takes in a candidate entity and returns the field we should apply the pin toallow_down_ranking
- Whether to allow down-ranking of candidates that are not pinned
wyvern.components.ranking_pipeline
RankingRequest Objects
query
- the query entitycandidates
- the list of candidate entities
ResponseCandidate Objects
candidate_id
- the identifier of the candidateranked_score
- the ranked score of the candidate
RankingResponse Objects
ranked_candidates
- the list of ranked candidatesevents
- the list of logged events
RankingPipeline Objects
PATH
- the path of the API. This is used in the API routing. The default value is “/ranking”.
get_model
get_business_logic
- Deduplication
- Filtering
- (De)boosting
rank_candidates
- It first calls the ranking model to get the model scores for the candidates.
- It then calls the business logic pipeline to adjust the model scores.
- It returns the adjusted candidates.
request
- the ranking request
wyvern.components.index._index
IndexUploadComponent Objects
execute
wyvern.components.index
wyvern.components.impressions
wyvern.components.impressions.impression_logger
ImpressionEventData Objects
impression_score
- The score of the impression.impression_order
- The order of the impression.
ImpressionEvent Objects
event_type
- The type of the event. This is always EventType.IMPRESSION.
ImpressionEventLoggingRequest Objects
request
- The request that was made.scored_impressions
- The scored impressions. This is a list of scored candidates. Each scored candidate has an entity and a score.
ImpressionEventLoggingComponent Objects
execute
input
- The input to the component. This contains the request and the scored impressions.
wyvern.components.events.events
EventType Objects
LoggedEvent Objects
request_id
- The request ID of the request that triggered the event.api_source
- The API source of the request that triggered the event.event_timestamp
- The timestamp of the event.event_type
- The type of the event.event_data
- The data associated with the event. This is a generic type that can be any subclass of BaseModel.
EntityEventData Objects
entity_identifier
- The identifier of the entity that the event is associated with.entity_identifier_type
- The type of the entity identifier.
CustomEvent Objects
event_type
- The type of the event. This is always EventType.CUSTOM.
wyvern.components.events
wyvern.components.component
ComponentStatus Objects
Component Objects
initialize
initialize_wrapper
execute
manifest_feature_names
get_feature
get_all_features
wyvern.components.pipeline_component
PipelineComponent Objects
realtime_features_overrides
retrieve_features
wyvern.components.helpers.linear_algebra
CosineSimilarityComponent Objects
execute
input
- List of tuples of embeddings to compute cosine similarity for.
cosine_similarity
wyvern.components.helpers.sorting
SortingComponent Objects
execute
input
- A list of candidates to be sorted. Each candidate must have a score.descending
- Whether to sort in descending order. Defaults to True.
wyvern.components.helpers
wyvern.redis
WyvernRedis Objects
__init__
get_entity
get_entities
delete_entity
delete_entities
wyvern.utils
wyvern.wyvern_tracing
setup_tracing
wyvern.wyvern_logging
setup_logging
wyvern.exceptions
WyvernError Objects
message
- The error message.error_code
- The error code.
WyvernEntityValidationError Objects
PaginationError Objects
WyvernRouteRegistrationError Objects
ComponentAlreadyDefinedInPipelineComponentError Objects
WyvernFeatureStoreError Objects
WyvernFeatureNameError Objects
WyvernModelInputError Objects
WyvernModelbitTokenMissingError Objects
WyvernModelbitValidationError Objects
WyvernAPIKeyMissingError Objects
ExperimentationProviderNotSupportedError Objects
ExperimentationClientInitializationError Objects
wyvern.aws.kinesis
KinesisFirehoseStream Objects
get_stream_name
customer_specific
- Whether the stream name should be customer specificenv_specific
- Whether the stream name should be environment specific
WyvernKinesisFirehose Objects
put_record_batch_callable
stream_name
KinesisFirehoseStream - The stream to put records torecord_generator
List[Callable[[], List[BaseModel]]] - A list of functions that return a list of records
put_record_batch
stream_name
KinesisFirehoseStream - The stream to put records torecords
List[BaseModel] - A list of records
wyvern.aws
wyvern.event_logging
wyvern.event_logging.event_logger
log_events
event_generator
- A function that returns a list of events to be logged.
get_logged_events
get_logged_events_generator
log_custom_events
events
- A list of custom events to be logged.
wyvern.web_frameworks.fastapi
lifespan
WyvernFastapi Objects
- A healthcheck endpoint
- A request middleware that logs the request and response payloads
- A request middleware that sets the WyvernRequest in the request context
- Auto registration of routes from APIRouteComponent subclasses
register_route
route_component
- The route component to register.
WyvernRouteRegistrationError
- If the route component is not a subclass of APIRouteComponent.
wyvern.web_frameworks
wyvern.wyvern_request
WyvernRequest Objects
method
- The HTTP method of the requesturl
- The full URL of the requesturl_path
- The path of the URL of the requestjson
- The JSON body of the request, represented by pydantic modelheaders
- The headers of the requestentity_store
- A dictionary that can be used to store entities that are created during the requestevents
- A list of functions that return a list of LoggedEvents. These functions are called at the end of the request to log events to the event storefeature_map
- A FeatureMap that can be used to store features that are created during the requestrequest_id
- The request ID of the request
parse_fastapi_request
json
- The JSON body of the request, represented by pydantic modelreq
- The FastAPI requestrequest_id
- The request ID of the request
wyvern.tracking
wyvern.feature_store.constants
wyvern.feature_store
wyvern.feature_store.schemas
GetOnlineFeaturesRequest Objects
entities
- A dictionary of entity name to entity value.features
- A list of feature names.full_feature_names
- A boolean indicating whether to return full feature names. If True, the feature names will be returned in the format<feature_view_name>__<feature_name>
. If False, only the feature names will be returned.
GetHistoricalFeaturesRequest Objects
entities
- A dictionary of entity name to entity value.timestamps
- A list of timestamps. Used to retrieve historical features at specific timestamps. If not provided, the latest feature values will be returned.features
- A list of feature names.
GetFeastHistoricalFeaturesRequest Objects
full_feature_names
- A boolean indicating whether to return full feature names. If True, the feature names will be returned in the format<feature_view_name>__<feature_name>
. If False, only the feature names will be returned.entities
- A dictionary of entity name to entity value.features
- A list of feature names.
GetHistoricalFeaturesResponse Objects
results
- A list of dictionaries containing feature values.
MaterializeRequest Objects
end_date
- The end date of the materialization window. Defaults to the current time.feature_views
- A list of feature view names to materialize. If not provided, all feature views will be materialized.start_date
- The start date of the materialization window. Defaults to None, which will use the start date of the feature view.
RequestEntityIdentifierObjects Objects
request_ids
- A list of request IDs.entity_identifiers
- A list of entity identifiers.feature_names
- A list of feature names.
wyvern.feature_store.feature_server
CRONJOB_INTERVAL_SECONDS
5 minutesCRONJOB_LOOKBACK_MINUTES
12 minsgenerate_wyvern_store_app
path
- Path to the feature store repo.
start_wyvern_store
path
- Path to the feature store repo.host
- Host to run the feature store on.port
- Port to run the feature store on.
wyvern.feature_store.historical_feature_util
separate_real_time_features
full_feature_names
- a list of full feature names.
build_historical_real_time_feature_requests
full_feature_names
- a list of full feature names.request_ids
- a list of request ids.entities
- a dictionary of entity names and their values.
process_historical_real_time_features_requests
requests
- a dictionary of entity types and their corresponding requests.
process_historical_real_time_features_request
entity_identifier_type
- the entity type of the request. E.g. “product__query”request
- the request object.context
- the snowflake connection context.
group_realtime_features_by_entity_type
full_feature_names
- a list of full feature names.
group_registry_features_by_entities
full_feature_names
- a list of full feature names.store
- the feast feature store.
build_historical_registry_feature_requests
store
- the feast feature store.feature_names
- a list of feature names.entity_values
- a dictionary of entity names and their values.timestamps
- a list of timestamps for getting historical features at those timestamps.
process_historical_registry_features_requests
store
- the feast feature store.requests
- a list of historical feature requests.
process_historical_registry_features_request
store
- the feast feature store.request
- a historical feature request.
wyvern.helper.sort
SortEnum Objects
Sort Objects
sort_key
- The key to sort on.sort_field
- The field to sort on.sort_order
- The order to sort on. Defaults to desc.
wyvern.helper
wyvern.entities.feature_entity_helpers
feature_map_join
feature_map_create
wyvern.entities.index_entities
wyvern.entities.identifier_entities
WyvernDataModel Objects
_all_entities
- a list of all the entities under the tree_all_identifiers
- a list of all the identifiers under the tree
index_fields
get_all_entities
get_all_identifiers
WyvernEntity
— a WyvernDataModel
can have many
entities within it, it itself may not be an entity
nested_hydration
class WyvernField(pydantic.Field)
to represent the “entity ide field”, which will reference to the nested entity field name
WyvernEntity Objects
identifier
load_fields
brand_id: Optional[str]
and brand: Optional[Brand]
,
as the hydrated entity. We fetch the brand_id for the product from Wyvern Index,
as the first hydration step for Product entity, then we fetch brand entity from Wyvern Index,
as the second hydration step
QueryEntity Objects
query
- the query string
generate_identifier
Identifier
- the identifier for this entity with identifier_type=SimpleIdentifierType.QUERY.
ProductEntity Objects
product_id
- the product id
generate_identifier
Identifier
- the identifier for this entity with identifier_type=SimpleIdentifierType.PRODUCT.
UserEntity Objects
user_id
- the user id
generate_identifier
Identifier
- the identifier for this entity with identifier_type=SimpleIdentifierType.USER.
wyvern.entities.request
BaseWyvernRequest Objects
request_id
- The request id.include_events
- Whether to include events in the response.
generate_identifier
Identifier
- The identifier for the request. The identifier type is “request”.
wyvern.entities
wyvern.entities.feature_entities
FeatureData Objects
identifier
- The identifier of the entity.features
- A dictionary of feature names to feature values.
FeatureMap Objects
build_empty_feature_map
wyvern.entities.identifier
SimpleIdentifierType Objects
composite
CompositeIdentifierType Objects
Identifier Objects
CompositeIdentifier Objects
wyvern.entities.candidate_entities
ScoredCandidate Objects
entity
- The candidate entity.score
- The score of the candidate entity. Defaults to 0.0.
CandidateSetEntity Objects
candidates
- The list of candidate entities.
examples
examples.feature_store_main
run
examples.example_business_logic
sample_product_query_ranking_request
python wyvern/examples/example_business_logic.py
Json representation of the request: