fix(search): separate channel candidate retrieval limit before fusion… - #146
Open
ayan-waqas wants to merge 1 commit into
Open
fix(search): separate channel candidate retrieval limit before fusion…#146ayan-waqas wants to merge 1 commit into
ayan-waqas wants to merge 1 commit into
Conversation
…grayhatdevelopers#88) - Introduce resolve_candidate_limit() in search_fusion to calculate bounded internal candidate pools per search channel - Update Application.search() and Application.query_video() to use candidate limits for channel queries while returning top_k final fused moments - Add unit and regression tests for candidate depth and top-k retrieval bounds
Member
|
Hey @ayan-waqas, |
Author
|
@SaadBazaz I have starred the repo , kindly review the PR now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #88
Summary
resolve_candidate_limit(top_k)insrc/vidxp/search_fusion.pyto calculate internal retrieval limits for candidate pools per search channel (bounded between 50 and 500 candidates).VidXPApplication.search()andVidXPApplication.query_video()insrc/vidxp/application.pyto usecandidate_limitwhen fetching channel candidates, while returningcommand.top_kfinal fused moments to callers.top_k) and response schemas without breaking compatibility.Validation
resolve_candidate_limitbounds and candidate expansion intests/test_search_fusion.py:resolve_candidate_limit(3)returns50,resolve_candidate_limit(200)returns500, and0/negative inputs remain un-expanded.top_k=2) is retrieved in candidate pools and wins docs/open source v1 #1 in fused results.Application.searchcandidate limit verification intests/test_application.py:50) for channel search whentop_k=3is requested..venv/bin/pytest tests/test_search_fusion.py tests/test_application.py tests/test_query_service.py: