Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the Recommendations backend [boilerplate] #4296

Closed
Tracked by #4044
akolson opened this issue Sep 26, 2023 · 0 comments · Fixed by #4301
Closed
Tracked by #4044

Implement the Recommendations backend [boilerplate] #4296

akolson opened this issue Sep 26, 2023 · 0 comments · Fixed by #4301
Assignees
Labels

Comments

@akolson
Copy link
Member

akolson commented Sep 26, 2023

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 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

  1. 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
  1. The class should connect to the recommendations model(if required) by implementing connect().
  2. Implement the make_request() method that generates embeddings or recommends content.
  3. 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.


Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant