Skip to content

Adding request-timeout for recall metrics for so_vector #800

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benwtrent
Copy link
Member

we need to adjust timeout for recall tasks for so_vector.

@benwtrent benwtrent requested a review from gbanasiak June 25, 2025 13:26
@@ -200,6 +204,7 @@ async def __call__(self, es, params):
k = params["size"]
num_candidates = params["num_candidates"]
index = params["index"]
request_timeout = params.get("request-timeout", -1)
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know the appropriate default value to indicate "no timeout". I think for these recall metrics only, that is what we care about as these types of queries (script & knn) are performance tested elsewhere. So if there is a significant regression, we will catch it in those other operations.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, was looking at exactly the same line :)

@@ -200,6 +204,7 @@ async def __call__(self, es, params):
k = params["size"]
num_candidates = params["num_candidates"]
index = params["index"]
request_timeout = params.get("request-timeout", -1)
Copy link
Contributor

@gbanasiak gbanasiak Jun 25, 2025

Choose a reason for hiding this comment

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

Looking at https://www.elastic.co/docs/reference/elasticsearch/clients/python/configuration#timeouts it's not clear to me what's the behavior with a negative value. Did it work in your tests?

I think it would be safer to either use None (no timeout) or some positive value (some timeout). If you're OK with defaulting to no timeout, we could just use None here, instead of -1.

Alternatively, to allow setting either None or some positive value, or not setting anything (and thus defaulting to Rally-level timeout):

DEFAULT = 0
es_kwargs = {}
request_timeout = params.get("request-timeout", DEFAULT)
if request_timeout != DEFAULT:
  es_kwargs["request_timeout"] = request_timeout
[..]
await es.<method>(..., **es_kwargs).

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.

2 participants