feat: add progress_callback to GVM process_sequence#166
Open
JamesNyeVRGuy wants to merge 1 commit intonikopueringer:mainfrom
Open
feat: add progress_callback to GVM process_sequence#166JamesNyeVRGuy wants to merge 1 commit intonikopueringer:mainfrom
JamesNyeVRGuy wants to merge 1 commit intonikopueringer:mainfrom
Conversation
Adds an optional progress_callback parameter to GVMProcessor.process_sequence(). Called after each batch with (current_batch, total_batches). Backwards-compatible — defaults to None with no behavior change when not passed. This enables callers (CLI, WebUI, etc.) to report per-batch progress during GVM alpha generation.
3 tasks
shezmic
reviewed
Mar 14, 2026
Contributor
shezmic
left a comment
There was a problem hiding this comment.
This fixes an existing TypeError on upstream main.
backend/service.py (line 861) already calls:
gvm.process_sequence(
...
progress_callback=_gvm_progress,
)But gvm_core/wrapper.py's process_sequence() signature on main doesn't include progress_callback. Every call to service.run_gvm() currently throws:
TypeError: process_sequence() got an unexpected keyword argument 'progress_callback'
The implementation here is correct. The callback is called with (batch_id + 1, len(dataloader)), which matches the _gvm_progress(batch_idx, total_batches) contract in service.py. The None default preserves backward compatibility for any direct callers.
No no-go zones touched. Looks good to me.
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.
Adds an optional progress_callback parameter to
GVMProcessor.process_sequence(). Called after each batch with (current_batch, total_batches). Backwards-compatible — defaults to None with no behavior change when not passed.
This enables callers (CLI, WebUI, etc.) to report per-batch progress during GVM alpha generation.