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) Support requestthreads persearch #939

Merged
merged 10 commits into from
Oct 1, 2024

Conversation

thomasht86
Copy link
Collaborator

@thomasht86 thomasht86 commented Sep 27, 2024

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Why

The goal of the PR is to demonstrate how the new ServicesConfiguration can be used to define arbitrary services.xml configurations, with requestthreads persearch threads as an example, ref #895

The demonstration is added to the advanced_configurations.ipynb-notebook.

What

This pull request some minor changes to the vespa package, focusing on adding support for num_threads_per_search in rank profiles and improving XML service configuration validation. The most important changes are grouped into three themes: new features and test enhancements.

New Features:

  • Added num_threads_per_search parameter to the RankProfile class, allowing customization of the number of threads per search. (vespa/package.py, vespa/templates/schema.txt) [1] [2] [3] [4] [5] [6] [7]
  • Updated test_package.py to include num_threads_per_search in the rank profile tests. (tests/unit/test_package.py) [1] [2]

Test Enhancements:

  • Introduced TestColbertLongServicesConfiguration class to validate XML service configurations and generate XML dynamically for testing. (tests/unit/test_configuration.py)
  • Simplified XML validation in existing tests by removing redundant conversion to etree objects. (tests/unit/test_configuration.py) [1] [2]

These changes aim to improve the flexibility of rank profile configurations and ensure robust validation of service configurations.

CC: @jobergum

@thomasht86 thomasht86 changed the title Thomasht86/support requestthreads persearch (feat) Support requestthreads persearch Sep 27, 2024
@thomasht86 thomasht86 marked this pull request as ready for review September 27, 2024 12:30
Copy link
Contributor

@glebashnik glebashnik left a comment

Choose a reason for hiding this comment

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

Looks good!

@thomasht86 thomasht86 merged commit 5aa13a8 into master Oct 1, 2024
45 checks passed
@thomasht86 thomasht86 deleted the thomasht86/support-requestthreads-persearch branch October 1, 2024 08:28
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