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 RecommendationsAdapter [Boilerplate] #4302

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

Implement the RecommendationsAdapter [Boilerplate] #4302

akolson opened this issue Sep 28, 2023 · 0 comments · Fixed by #4303
Assignees
Labels

Comments

@akolson
Copy link
Member

akolson commented Sep 28, 2023

Overview

In addition to #4296, we need to create a RecommendationsAdapter that inherits the base Adapter class in the appnexus library. The RecommendationsAdapter should be able to make requests to the Recommendations backend to generate embeddings and get recommendations using its make_request method.

Description and outcomes

  1. Create a new class RecommendationsAdapter that inherits Adapter:
CLASS RecommendationsAdapter INHERITS Adapter:
	METHOD generateEmbeddings(self, params) -> Boolean
		# [ Implementation ]

	METHOD getRecommendations(self, params) -> Array
		# [ Implementation ]
  1. Implement the generate embeddings and get recommendations methods that use the make_request() method in the Backend class
  2. The actual functionality depends on presence of an actual backend, so boilerplate will do for now.
  3. The class should be implemented within the contentcuration app in contentcuration/contentcuration/utils/recommendations.py

Accessibility requirements

Not applicable

Acceptance criteria

  1. The RecommendationsAdapter is created and it inherits the Adapter class.
  2. The make_request method is called within the generate embedding and get recommendations methods.
  3. Tests are written to validate correctness of the RecommendationsAdapter logic.
  4. 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