Skip to content

Add option --parse-parallelism - #332

Open
hannahbast wants to merge 5 commits into
mainfrom
parse-parallelism
Open

Add option --parse-parallelism#332
hannahbast wants to merge 5 commits into
mainfrom
parse-parallelism

Conversation

@hannahbast

Copy link
Copy Markdown
Collaborator

Add support for the new --parse-parallelism option 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, write PARSE_PARALLELISM, analogous to the existing settings.

This change is based on #331 and includes its commits.

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`.
Copilot AI lite review requested due to automatic review settings August 27, 2026 09:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-wide and --parse-parallelism.
  • Extend IndexCommand to treat these as relevant Qleverfile options and append them to the generated index_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.
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