(feat) Support requestthreads persearch #939
Merged
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.
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 arbitraryservices.xml
configurations, withrequestthreads
persearch
threads as an example, ref #895The demonstration is added to the
advanced_configurations.ipynb
-notebook.What
This pull request some minor changes to the
vespa
package, focusing on adding support fornum_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:
num_threads_per_search
parameter to theRankProfile
class, allowing customization of the number of threads per search. (vespa/package.py
,vespa/templates/schema.txt
) [1] [2] [3] [4] [5] [6] [7]test_package.py
to includenum_threads_per_search
in the rank profile tests. (tests/unit/test_package.py
) [1] [2]Test Enhancements:
TestColbertLongServicesConfiguration
class to validate XML service configurations and generate XML dynamically for testing. (tests/unit/test_configuration.py
)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