(fix): refactor audio stage names to be shown after running benchmark#1470
Open
SwekeR-463 wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
Open
(fix): refactor audio stage names to be shown after running benchmark#1470SwekeR-463 wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
SwekeR-463 wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
Conversation
ee5bba1 to
3d7cca0
Compare
Contributor
Greptile OverviewGreptile Summary
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
autonumber
participant Exec as Executor/Backend
participant Stage as ProcessingStage
participant TaskIn as Input Task
participant TaskOut as Output Task(s)
Exec->>Stage: process_batch(tasks)
loop for each task in tasks
Stage->>Stage: validate_input(task)
Stage->>Stage: result = process(task)
alt result is None
Stage-->>Exec: skip (filtered out)
else result is list
loop for each r in result
alt r has empty _stage_perf and r != task
Stage->>TaskOut: r._stage_perf = copy(task._stage_perf)
end
end
Stage-->>Exec: results.extend(result)
else result is single task
alt result has empty _stage_perf and result != task
Stage->>TaskOut: result._stage_perf = copy(task._stage_perf)
end
Stage-->>Exec: results.append(result)
end
end
Exec-->>Exec: downstream stages consume results
|
Comment on lines
182
to
193
| result = self.process(task) | ||
| if isinstance(result, list): | ||
| for r in result: | ||
| if r is not task and hasattr(r, "_stage_perf") and not r._stage_perf: | ||
| r._stage_perf = list(task._stage_perf) | ||
| results.extend(result) | ||
| else: | ||
| if result is not task and hasattr(result, "_stage_perf") and not result._stage_perf: | ||
| result._stage_perf = list(task._stage_perf) | ||
| results.append(result) |
Contributor
There was a problem hiding this comment.
None result can crash
ProcessingStage.process() is documented to allow None for filtering, but process_batch() treats any non-list result as a task-like object and then does hasattr(result, "_stage_perf") / results.append(result). With this change, if process() returns None, the else branch will raise (at result is not task / hasattr(...)) and/or append None into results. This is a functional regression in the default batch path for any stage that filters tasks by returning None.
Fix by explicitly handling result is None before the list/non-list logic (skip or continue).
Signed-off-by: SwekeR-463 <swekerswasti@gmail.com>
Signed-off-by: SwekeR-463 <swekerswasti@gmail.com>
2a05acd to
f6a5132
Compare
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.
Description
Fixes #1464
_stage_perfwhen stages return new task instances.StagePerfStatsstage names.Snippet
After re running
python benchmarking/run.py --config benchmarking/nightly-benchmark.yaml --entries audio_fleursgot this output.Checklist