Skip to content

Streaming Sortformer release PR02: unit tests for streaming models and modules - #14417

Merged
tango4j merged 6 commits into
NVIDIA-NeMo:mainfrom
tango4j:streaming_sortformer_pr2_unittest
Aug 7, 2025
Merged

tango4j merged 6 commits into
NVIDIA-NeMo:mainfrom
tango4j:streaming_sortformer_pr2_unittest

Conversation

@tango4j

@tango4j tango4j commented Aug 6, 2025

Copy link
Copy Markdown
Collaborator

What does this PR do ?

uploading unit tests for streaming Sortformer models and modules

Collection: [Note which collection this PR will affect]

ASR/speaker_tasks

  • Adding test_diar_sortformer_models.py
  • Adding test_diar_sortformer_modules.py

Adding bugfix, refactored variables and yaml file name fix.

# For evaluation of streaming speaker diarization
python $BASEPATH/neural_diarizer/e2e_diarize_speech.py \
    model_path=/path/to/diar_streaming_sortformer_4spk-v2.nemo \
    batch_size=1 \
    dataset_manifest=/path/to/diarization_manifest.json

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in NeMo ASR

Additional Information

  • Related to # (issue)

tango4j added 3 commits August 6, 2025 10:00
Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: taejinp <tango4j@gmail.com>
…nd modules

Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: tango4j <tango4j@users.noreply.github.com>
@tango4j
tango4j requested a review from Copilot August 6, 2025 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces comprehensive unit tests for streaming Sortformer models and modules, along with necessary bug fixes and parameter refactoring to support the streaming functionality. The changes enhance the testing coverage for speaker diarization models and ensure proper validation of streaming parameters.

  • Adds extensive unit test coverage for streaming Sortformer modules and models
  • Refactors parameter names and adds validation for streaming configurations
  • Fixes bugs related to audio signal dimension handling and target-prediction shape mismatches

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/collections/speaker_tasks/test_diar_sortformer_modules.py Comprehensive unit tests for SortformerModules covering streaming parameters, utilities, score computations, and streaming updates
tests/collections/speaker_tasks/test_diar_sortformer_models.py Unit tests for SortformerEncLabelModel with separate test classes for offline and streaming modes
nemo/collections/asr/modules/sortformer_modules.py Core module updates including parameter validation, streaming state management, and bug fixes
nemo/collections/asr/modules/conformer_encoder.py Fix for audio signal dimension handling in bypass_pre_encode mode
nemo/collections/asr/models/sortformer_diar_models.py Model updates with target truncation handling and test step implementation
examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py Parameter name updates and streaming validation integration
examples/speaker_tasks/diarization/conf/post_processing/ New YAML configuration files for streaming post-processing
examples/speaker_tasks/diarization/conf/neural_diarizer/streaming_sortformer_diarizer_4spk-v2.yaml Complete configuration file for streaming Sortformer diarizer

tango4j added 2 commits August 6, 2025 11:23
Signed-off-by: taejinp <tango4j@gmail.com>
@NVIDIA-NeMo NVIDIA-NeMo deleted a comment from Copilot AI Aug 6, 2025
@NVIDIA-NeMo NVIDIA-NeMo deleted a comment from Copilot AI Aug 6, 2025
@NVIDIA-NeMo NVIDIA-NeMo deleted a comment from Copilot AI Aug 6, 2025
@tango4j tango4j added Run CICD and removed Run CICD labels Aug 6, 2025

@ipmedenn ipmedenn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@tango4j
tango4j merged commit fe31626 into NVIDIA-NeMo:main Aug 7, 2025
nasretdinovr pushed a commit to nasretdinovr/NeMo that referenced this pull request Aug 8, 2025
…d modules (NVIDIA-NeMo#14417)

* Uploading bugfixes, refactored vars and yamlfile name changes

Signed-off-by: taejinp <tango4j@gmail.com>

* Adding the missing offline pp yamls

Signed-off-by: taejinp <tango4j@gmail.com>

* Streaming Sortformer release PR02: unit tests for sortformer models and modules

Signed-off-by: taejinp <tango4j@gmail.com>

* Apply isort and black reformatting

Signed-off-by: tango4j <tango4j@users.noreply.github.com>

* Resolved CODE QL and test issues

Signed-off-by: taejinp <tango4j@gmail.com>

---------

Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: tango4j <tango4j@users.noreply.github.com>
Co-authored-by: tango4j <tango4j@users.noreply.github.com>
guyueh1 pushed a commit to guyueh1/NeMo that referenced this pull request Aug 25, 2025
…d modules (NVIDIA-NeMo#14417)

* Uploading bugfixes, refactored vars and yamlfile name changes

Signed-off-by: taejinp <tango4j@gmail.com>

* Adding the missing offline pp yamls

Signed-off-by: taejinp <tango4j@gmail.com>

* Streaming Sortformer release PR02: unit tests for sortformer models and modules

Signed-off-by: taejinp <tango4j@gmail.com>

* Apply isort and black reformatting

Signed-off-by: tango4j <tango4j@users.noreply.github.com>

* Resolved CODE QL and test issues

Signed-off-by: taejinp <tango4j@gmail.com>

---------

Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: tango4j <tango4j@users.noreply.github.com>
Co-authored-by: tango4j <tango4j@users.noreply.github.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>

This branch was previously deployed

1 inactive deployment
test — 73ff83c7 Deployed Aug 6, 2025 by tango4j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants