Classification model integration - #204
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| if embeddings.size == 0: | ||
| # No further processing needed if there are no embeddings | ||
| return [] | ||
| knn_response = await self.get_knn_matches_from_embeddings(embeddings=embeddings, model=model) | ||
| knn_response = await self.get_knn_matches_from_embeddings(model_output=embeddings, model=model) | ||
|
|
There was a problem hiding this comment.
Unpack RepresentationModelOutput in search endpoint
The refactor makes get_embeddings return a RepresentationModelOutput, but the search path still unpacks it as query_ids, embeddings and passes embeddings (a RepresentationModelOutput) to get_knn_matches_from_embeddings. At runtime this raises TypeError: cannot unpack non-iterable RepresentationModelOutput and the search endpoint fails before issuing the KNN request. Capture the object returned by get_embeddings and use its sample_ids and embeddings fields when building the response.
Useful? React with 👍 / 👎.
|



No description provided.