test_cleanup_with_different_batchsize() — langchain Function Reference
Architecture documentation for the test_cleanup_with_different_batchsize() function in test_indexing.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 875469f1_06f0_219c_49e2_626bd0a426d3["test_cleanup_with_different_batchsize()"] 9bc4e8b6_769a_ae11_3fc1_309cb678c248["test_indexing.py"] 875469f1_06f0_219c_49e2_626bd0a426d3 -->|defined in| 9bc4e8b6_769a_ae11_3fc1_309cb678c248 style 875469f1_06f0_219c_49e2_626bd0a426d3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/indexes/test_indexing.py lines 1225–1264
def test_cleanup_with_different_batchsize(
record_manager: SQLRecordManager,
vector_store: VectorStore,
) -> None:
"""Check that we can clean up with different batch size."""
docs = [
Document(
page_content="This is a test document.",
metadata={"source": str(d)},
)
for d in range(1000)
]
assert index(docs, record_manager, vector_store, cleanup="full") == {
"num_added": 1000,
"num_deleted": 0,
"num_skipped": 0,
"num_updated": 0,
}
docs = [
Document(
page_content="Different doc",
metadata={"source": str(d)},
)
for d in range(1001)
]
assert index(
docs,
record_manager,
vector_store,
cleanup="full",
cleanup_batch_size=17,
) == {
"num_added": 1001,
"num_deleted": 1000,
"num_skipped": 0,
"num_updated": 0,
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_cleanup_with_different_batchsize() do?
test_cleanup_with_different_batchsize() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py.
Where is test_cleanup_with_different_batchsize() defined?
test_cleanup_with_different_batchsize() is defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py at line 1225.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free