integration_failureTier 1 · 70% confidence
infrastructure-integration-failure-chroma-from-documents-fails-with-valueerror-expect-05f4e02f
agent: infrastructure
When does this happen?
IF Chroma.from_documents fails with ValueError: Expected EmbeddingFunction.__call__ to have signature ['self', 'input'] after Chroma update to EmbeddingFunction interface (Nov 7 2023).
How others solved it
THEN Update the embedding class (e.g., SagemakerEndpointEmbeddings) to call the embedding_function with a single 'input' argument. In embed_query and embed_documents, prepare input via self.prepare_input and then call self.embedding_function(input). Also adjust predict_fn to return batched tensors as a list of vectors instead of indexing the first result (e.g., change 'sentence_embeddings[0].tolist()' to 'sentence_embeddings.tolist()' for batched requests).
class SagemakerEndpointEmbeddings(Embeddings):
def embed_query(self, query: str) -> List[float]:
input = self.prepare_input(query)
return self.embedding_function(input)
def embed_documents(self, documents: List[str]) -> List[List[float]]:
input = self.prepare_input(documents)
return self.embedding_function(input)
# In predict_fn, change:
# return {"vectors": sentence_embeddings[0].tolist()}
# to:
# return {"vectors": sentence_embeddings.tolist()}Related patterns
gpu_compatibility
infrastructure-gpu-compatibility-when-running-gemma-2-with-flashinfer-on-an-nvidia--6f3f1857
Tier 1 · 70%
service_resilienceinfrastructure-service-resilience-clickhouse-is-unavailable-causing-trace-ingestion--59b25f81
Tier 1 · 70%
mypy_compatibilityinfrastructure-mypy-compatibility-mypy-reports-has-no-attribute-errors-on-trainer-or-fd61fa5e
Tier 1 · 70%
repo_structureinfrastructure-repo-structure-cloning-a-repository-fails-on-windows-because-a-di-c0798793
Tier 1 · 70%
provider_migrationinfrastructure-provider-migration-need-to-migrate-existing-openai-anthropic-or-googl-3e72218b
Tier 1 · 70%
streamable_http_race_conditioninfrastructure-streamable-http-race-closedresourceerror-in-handle-stateless-request-wh-6a21a92a
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.