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

ValueError: Vector column vector has variable length vectors Set on_bad_vectors='drop' to remove them, or set on_bad_vectors='fill' and fill_value=<value> to replace them. #1865

Open
AhmadShaik opened this issue Jan 23, 2025 · 0 comments

Comments

@AhmadShaik
Copy link

Code:

txt_path = "/media/ahamad/ontent_large_pdf"
# # html_paths = get_sds_paths(pdf_dir, extn=".html")  
# chunking_strategy=SemanticChunking()

# vector_db=PgVector(
#     table_name="autozone_documents",
#     db_url="postgresql+psycopg://ai:ai@localhost:5432/ai",
#     embedder=OllamaEmbedder(),
# ),

vector_db = LanceDb(
    table_name="auto_zone",
    uri="/tmp/lancedb",
    embedder=OllamaEmbedder()
)

knowledge_base = PDFKnowledgeBase(
    path=txt_path,
    vector_db=vector_db,     
    # vector_db=ChromaDb(collection="auto_zone", embedder=OllamaEmbedder()),
    # chunking_strategy=SemanticChunking()
    chunking_strategy=FixedSizeChunking()
)

knowledge_base.load(recreate=False)

Error:

Exception has occurred: ValueError
Vector column vector has variable length vectors Set on_bad_vectors='drop' to remove them, or set on_bad_vectors='fill' and fill_value=<value> to replace them.
  File "/media/ahamad/work/projects/auto_zone/Autozone_experiments/knowledge_base.py", line 47, in <module>
    knowledge_base.load(recreate=False)
ValueError: Vector column vector has variable length vectors Set on_bad_vectors='drop' to remove them, or set on_bad_vectors='fill' and fill_value=<value> to replace them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant