Skip to content

Conversation

@vishwarajanand
Copy link
Owner

@vishwarajanand vishwarajanand commented May 19, 2025

Adds doc blocks for Sync VS towards hybrid search config.

Test Log
(venv311) (base) ➜  langchain-postgres git:(hybrid_search_4) ✗ python -m pytest -vvv tests/unit_tests/v2/test_pg_vectorstore_search.py -k _hybrid_search
/usr/local/google/home/vishwarajanand/github/langchain-postgres/venv311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:217: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
======================================================================== test session starts ========================================================================
platform linux -- Python 3.11.12, pytest-8.3.5, pluggy-1.6.0 -- /usr/local/google/home/vishwarajanand/github/langchain-postgres/venv311/bin/python
cachedir: .pytest_cache
rootdir: /usr/local/google/home/vishwarajanand/github/langchain-postgres
configfile: pyproject.toml
plugins: anyio-4.9.0, timeout-2.4.0, asyncio-0.26.0, langsmith-0.3.42
timeout: 30.0s
timeout method: signal
timeout func_only: False
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 108 items / 106 deselected / 2 selected                                                                                                                   

tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearch::test_asimilarity_hybrid_search PASSED                                               [ 50%]
tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearchSync::test_similarity_hybrid_search PASSED                                            [100%]

========================================================================= warnings summary ==========================================================================
venv311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:1140: 10 warnings
tests/unit_tests/v2/test_pg_vectorstore_search.py: 1 warning
  /usr/local/google/home/vishwarajanand/github/langchain-postgres/venv311/lib/python3.11/site-packages/pytest_asyncio/plugin.py:1140: PytestDeprecationWarning: The "scope" keyword argument to the asyncio marker has been deprecated. Please use the "loop_scope" argument instead.
  
    warnings.warn(PytestDeprecationWarning(_MARKER_SCOPE_KWARG_DEPRECATION_WARNING))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================== slowest 5 durations ========================================================================
8.28s setup    tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearch::test_asimilarity_hybrid_search
8.12s setup    tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearchSync::test_similarity_hybrid_search
4.72s call     tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearchSync::test_similarity_hybrid_search
4.16s call     tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearch::test_asimilarity_hybrid_search
1.31s teardown tests/unit_tests/v2/test_pg_vectorstore_search.py::TestVectorStoreSearch::test_asimilarity_hybrid_search
========================================================== 2 passed, 106 deselected, 11 warnings in 28.74s ==========================================================
(venv311) (base) ➜  langchain-postgres git:(hybrid_search_4) ✗

Copy link

@dishaprakash dishaprakash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vishwarajanand vishwarajanand marked this pull request as ready for review June 3, 2025 06:42
@vishwarajanand vishwarajanand merged commit 08a4ff6 into hybrid_search_3 Jun 3, 2025
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

Successfully merging this pull request may close these issues.

4 participants