Add option --parse-parallelism - #332
Open
hannahbast wants to merge 5 commits into
Open
Conversation
This complements ad-freiburg/qlever#3278. In the Qleverfile, write `ENCODE_AS_ID_WIDE`.
The new option was missing from the expected argument list and from the mocked arguments, so three tests saw a `MagicMock` instead of `None` and passed it on to the index command.
This complements the corresponding option of the QLever index builder, which controls the number of threads for the first pass of the index build (parsing and converting triples to IDs). In the Qleverfile, write `PARSE_PARALLELISM`.
There was a problem hiding this comment.
Pull request overview
Adds support in qlever-control for QLever index builder’s new --parse-parallelism flag (and, via the included #331 commits, --encode-as-id-wide), enabling these options to be configured via the Qleverfile and forwarded into the constructed index build command.
Changes:
- Extend Qleverfile argument definitions to include
--encode-as-id-wideand--parse-parallelism. - Extend
IndexCommandto treat these as relevant Qleverfile options and append them to the generatedindex_cmd. - Update unit tests to include the new arguments in expected relevant-argument lists and to set new args in mocked
args.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/qlever/commands/test_index_other_methods.py | Updates expected relevant Qleverfile argument list to include encode_as_id_wide and parse_parallelism. |
| test/qlever/commands/test_index_execute.py | Extends mocked args setup to define the new attributes (encode_as_id_wide, parse_parallelism). |
| src/qlever/qleverfile.py | Adds CLI/Qleverfile argument definitions for --encode-as-id-wide and --parse-parallelism. |
| src/qlever/commands/index.py | Includes the new options in relevant Qleverfile args and forwards them into the index build command line. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+299
to
+300
| if args.parse_parallelism: | ||
| index_cmd += f" --parse-parallelism {args.parse_parallelism}" |
Comment on lines
295
to
+300
| if args.encode_as_id: | ||
| index_cmd += f" --encode-as-id {args.encode_as_id}" | ||
| if args.encode_as_id_wide: | ||
| index_cmd += f" --encode-as-id-wide {args.encode_as_id_wide}" | ||
| if args.parse_parallelism: | ||
| index_cmd += f" --parse-parallelism {args.parse_parallelism}" |
With parallel parsing, the largest inputs then start first, which minimizes the straggler tail at the end of the parsing phase. The order of the inputs is semantically irrelevant otherwise.
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.
Add support for the new
--parse-parallelismoption of the QLever index builder (ad-freiburg/qlever#3290), which controls the number of threads used for the first pass of the index build (parsing the input and converting the triples to IDs). In the Qleverfile, writePARSE_PARALLELISM, analogous to the existing settings.This change is based on #331 and includes its commits.