Skip to content
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

feat: Improvements to NvidiaRanker and adding user input timeout #1193

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

sjrl
Copy link
Contributor

@sjrl sjrl commented Nov 14, 2024

Related Issues

  • fixes #issue-number

Proposed Changes:

  • Adds user specifiable timeout. Previously hard coded to 60 seconds.
  • Improves the NvidiaRanker to have the same feature set as other rankers in Haystack (e.g. meta_fields_to_embed)
  • Adds more logging statements

How did you test it?

  • added and updated tests

Notes for the reviewer

Checklist

@github-actions github-actions bot added integration:nvidia type:documentation Improvements or additions to documentation labels Nov 14, 2024
@sjrl sjrl marked this pull request as ready for review November 15, 2024 15:48
@sjrl sjrl requested a review from a team as a code owner November 15, 2024 15:48
@sjrl sjrl requested review from vblagoje and removed request for a team November 15, 2024 15:48
@sjrl sjrl requested review from davidsbatista and removed request for vblagoje November 15, 2024 15:58
@@ -44,6 +47,7 @@ def __init__(
prefix: str = "",
suffix: str = "",
truncate: Optional[Union[EmbeddingTruncateMode, str]] = None,
timeout: Optional[float] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

This new parameter is missing in the to_dict()/serialization function

@@ -49,6 +50,7 @@ def __init__(
api_url: str = _DEFAULT_API_URL,
api_key: Optional[Secret] = Secret.from_env_var("NVIDIA_API_KEY"),
model_arguments: Optional[Dict[str, Any]] = None,
timeout: Optional[float] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

also here, same thing as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration:nvidia type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants