You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable the ability to obtain content recommendations based on a particular context, we need to create a Recommendations backend that implements the base Backend class in the appnexus library. The Recommendations backend should be able to make requests to the recommendations model(s) to generate embeddings(Generation is dependent on presence of an actual backend, so boilerplate should do for now).
Description and outcomes
Create a new class Recommendations that implements Backend:
CLASS Recommendations IMPLEMENTS Backend:
METHOD make_request(params):
# make request to recommendations model
METHOD connect(params):
# Implement the connect method to the recommendations model if any
CLASS METHOD _create_instance(cls)
# initialize a Recommendations Backend instance
The class should connect to the recommendations model(if required) by implementing connect().
Implement the make_request() method that generates embeddings or recommends content.
Generation of embeddings is dependent on presence of an actual backend, so boilerplate will do for now.
Accessibility requirements
Not applicable
Acceptance criteria
The Recommendations backend is created and it implements the Backend class.
The class connects to the recommendations model(if required).
The make_request method is implemented correctly and generates embeddings.
Tests are written to validate correctness of the Recommendations backend logic.
Documentation has been added to the backend class, explaining its purpose, inputs and outputs.
Overview
To enable the ability to obtain content recommendations based on a particular context, we need to create a
Recommendations
backend that implements the base Backend class in theappnexus
library. TheRecommendations
backend should be able to make requests to the recommendations model(s) to generate embeddings(Generation is dependent on presence of an actual backend, so boilerplate should do for now).Description and outcomes
Recommendations
that implementsBackend
:connect()
.make_request()
method that generates embeddings or recommends content.Accessibility requirements
Not applicable
Acceptance criteria
The
Recommendations
backend is created and it implements theBackend
class.The class connects to the recommendations model(if required).
The
make_request
method is implemented correctly and generates embeddings.Tests are written to validate correctness of the
Recommendations
backend logic.Documentation has been added to the backend class, explaining its purpose, inputs and outputs.
Resources
The text was updated successfully, but these errors were encountered: