test_async_cleanup_with_different_batchsize() — langchain Function Reference
Architecture documentation for the test_async_cleanup_with_different_batchsize() function in test_indexing.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fa4b4fd5_94eb_e2fe_de5e_035e8ab5f98f["test_async_cleanup_with_different_batchsize()"] 9bc4e8b6_769a_ae11_3fc1_309cb678c248["test_indexing.py"] fa4b4fd5_94eb_e2fe_de5e_035e8ab5f98f -->|defined in| 9bc4e8b6_769a_ae11_3fc1_309cb678c248 style fa4b4fd5_94eb_e2fe_de5e_035e8ab5f98f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/indexes/test_indexing.py lines 1268–1307
async def test_async_cleanup_with_different_batchsize(
arecord_manager: SQLRecordManager,
vector_store: InMemoryVectorStore,
) -> 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 await aindex(docs, arecord_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 await aindex(
docs,
arecord_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_async_cleanup_with_different_batchsize() do?
test_async_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_async_cleanup_with_different_batchsize() defined?
test_async_cleanup_with_different_batchsize() is defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py at line 1268.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free