Skip to content

Conversation

@ashwinb
Copy link
Contributor

@ashwinb ashwinb commented Feb 20, 2025

See Issue #922

The change is slightly backwards incompatible but no callsite (in our client codebases or stack-apps) every passes a depth-2 List[List[InterleavedContentItem]] (which is now disallowed.)

Test Plan

$ cd llama_stack/providers/tests/inference
$ pytest -s -v -k fireworks test_embeddings.py \
   --inference-model nomic-ai/nomic-embed-text-v1.5 --env EMBEDDING_DIMENSION=784
$  pytest -s -v -k together test_embeddings.py \
   --inference-model togethercomputer/m2-bert-80M-8k-retrieval --env EMBEDDING_DIMENSION=784
$ pytest -s -v -k ollama test_embeddings.py \
   --inference-model all-minilm:latest --env EMBEDDING_DIMENSION=784

Also ran tests/client-sdk/inference/test_embeddings.py

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 20, 2025
@ashwinb ashwinb linked an issue Feb 20, 2025 that may be closed by this pull request
@ashwinb ashwinb changed the title Update embeddings signature so inputs and outputs list align fix(api): update embeddings signature so inputs and outputs list align Feb 20, 2025
@hardikjshah
Copy link
Contributor

Looks reasonable, can you add a test please

Copy link
Contributor

@hardikjshah hardikjshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks super ! These tests will act as a future reference on how to test stuff.

@ashwinb ashwinb merged commit 6f9d622 into main Feb 21, 2025
4 checks passed
@ashwinb ashwinb deleted the emb_content_items branch February 21, 2025 05:43
mattf added a commit to mattf/llama-stack that referenced this pull request Feb 21, 2025
ashwinb pushed a commit that referenced this pull request Feb 21, 2025
# What does this PR do?

#1161 updated the embedding signature making the nested list tests
irrelevant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/v1/inference/embeddings input and output shape mismatch

4 participants