-
Notifications
You must be signed in to change notification settings - Fork 654
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
Fixed type problems from llmclient #770
base: main
Are you sure you want to change the base?
Changes from all commits
869eb46
477fb7c
976cba4
688735f
9ca2e66
c411a63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -683,7 +683,7 @@ def test_sparse_embedding(stub_data_dir: Path, vector_store: type[VectorStore]) | |
citation="WikiMedia Foundation, 2023, Accessed now", | ||
embedding_model=SparseEmbeddingModel(), | ||
) | ||
assert any(docs.texts[0].embedding) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep the If you think the assertion is the same behavior, can you add an assertion failure message, to help make what it's checking for clear? --- assert any(docs.texts[0].embedding), "We require the embedding to be populated"
+++ assert isinstance(docs.texts[0].embedding, list), "We require the embedding to be populated" |
||
assert isinstance(docs.texts[0].embedding, list) | ||
assert all( | ||
len(np.array(x.embedding).shape) == 1 for x in docs.texts | ||
), "Embeddings should be 1D" | ||
|
@@ -705,7 +705,7 @@ def test_hybrid_embedding(stub_data_dir: Path, vector_store: type[VectorStore]) | |
citation="WikiMedia Foundation, 2023, Accessed now", | ||
embedding_model=emb_model, | ||
) | ||
assert any(docs.texts[0].embedding) | ||
assert isinstance(docs.texts[0].embedding, list) | ||
|
||
# check the embeddings are the same size | ||
assert docs.texts[0].embedding is not None | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make these optional and defaulted to
None
?I am not against it, but more just wondering why. Can you add a
description
stating what these should be and whatNone
means