Skip to content

[TTS] Update multi-language eval report format#15915

Open
rlangman wants to merge 1 commit into
mainfrom
tts_report
Open

[TTS] Update multi-language eval report format#15915
rlangman wants to merge 1 commit into
mainfrom
tts_report

Conversation

@rlangman

@rlangman rlangman commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do ?

Update format of TTS comparison report

Collection: [TTS]

Changelog

  • Add language of each dataset to the UI
  • Fix bug where language in eval report folder name was default language instead of dataset specific language
  • Replace JIRA with POR link (though I did not rename the large number of variables with "jira" in their names)
  • Write filewise metrics file with raw text instead of ASCII encoded

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

Summary by CodeRabbit

  • New Features

    • TTS comparison reports now display each benchmark’s language alongside its name.
    • Report links now use POR references instead of Jira labels and destinations.
    • Benchmark metadata is presented more consistently across audio and evaluation reports.
  • Bug Fixes

    • Evaluation output folders now separate results by language and dataset.
    • Metrics files preserve non-ASCII characters when exported as JSON.

Signed-off-by: Ryan <rlangman@nvidia.com>
@rlangman rlangman self-assigned this Jul 15, 2026
@rlangman rlangman added the TTS label Jul 15, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

'mscenespeech': 'zh',
}

SUPPORTED_BENCHMARK_NAMES = BENCHMARK_META.keys()

@artem-gorodetskii artem-gorodetskii Jul 16, 2026

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.

The type was list[str], but it became KeysView; it should be converted to a list

@@ -52,4 +67,4 @@
DUMMY_TASK_ID: str = "NEMOTTS-0000"

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.

Since we decided to move from Jira to POR, DUMMY_TASK_ID is no longer valid. Linking a report to Jira used to be optional, so the task ID was optional as well. However, all development work must now be linked to a POR ticket, which means every comparison report should also be linked to a POR ticket. This suggests that we no longer need DUMMY_TASK_ID, and that --task_id should become a required argument in the report-generation CLI. This will also require updates to dependent functionality, such as the TaskInfo structure.

)


def make_task_info(task_id: str) -> TaskInfo:

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.

Since we decided to move from Jira to POR, TaskInfo should be updated accordingly. All Jira-specific references should be removed, including variable names and docstrings. It would make sense to keep only the task_id and task_url attributes.

<ul>
<li class="link-comment">
<a href="{{ jira_url }}" target="_blank" rel="noopener noreferrer">Jira {{ jira_id }}</a>
<a href="{{ jira_url }}" target="_blank" rel="noopener noreferrer">POR {{ jira_id }}</a>

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.

Please rename jira_url to task_url and jira_id to task_id for this template to match the updated terminology

<ul>
<li class="link-comment">
<a href="{{ jira_url }}" target="_blank" rel="noopener noreferrer">Jira {{ jira_id }}</a>
<a href="{{ jira_url }}" target="_blank" rel="noopener noreferrer">POR {{ jira_id }}</a>

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.

Same: please rename jira_url to task_url and jira_id to task_id for this template to match the updated terminology

- Both generated reports include a clickable Jira link derived from `--task_id`.
If no task ID is specified, the link points to the Jira project page.
- Both generated reports include a clickable POR link derived from `--task_id`.
If no task ID is specified, the link points to the POR project page.

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.

Suggestion: remove this sentence, since every comparison report should now be linked to a POR ticket, so a missing task ID is no longer a valid case

@artem-gorodetskii

artem-gorodetskii commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Since SUPPORTED_BENCHMARK_NAMES now includes multilingual benchmarks, it should not be used directly as the default for _DEFAULT_BENCHMARK_NAMES in generate_report.py. Please keep the default limited to a small set of key English benchmarks. Also, the default value for --audio_report_benchmarks should be updated, since libritts_test_clean,riva_hard_digits,riva_hard_letters is no longer a valid default

@artem-gorodetskii

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

TTS inference outputs now organize paths by language and preserve Unicode metrics. Comparison reports add benchmark language labels and replace Jira ticket links and labels with POR links.

Changes

TTS inference output organization

Layer / File(s) Summary
Output naming and metric serialization
examples/tts/magpietts_inference.py
Checkpoint naming omits the language suffix, dataset directories include language, and filewise metrics JSON preserves non-ASCII characters.

TTS comparison report updates

Layer / File(s) Summary
Benchmark metadata and report labels
scripts/tts_comparison_report/reporting/constants.py, scripts/tts_comparison_report/reporting/orchestrator.py
Benchmark metadata maps names to languages, which are appended to audio and evaluation report section labels.
POR ticket link migration
scripts/tts_comparison_report/reporting/helpers.py, scripts/tts_comparison_report/templates/*, scripts/tts_comparison_report/README.md, scripts/tts_comparison_report/reporting/constants.py
Ticket URL construction, report link labels, and README descriptions now use POR terminology and the POR base URL.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: blisc

Poem

A rabbit hops through reports bright,
With POR links tucked just right.
Languages bloom beside each name,
Unicode metrics join the game.
Output paths now sort with care—
Fluffy fixes everywhere! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating the TTS multi-language eval report format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tts_report

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/tts/magpietts_inference.py`:
- Around line 219-221: Update the checkpoint identity flow around
full_checkpoint_name and append_metrics_to_csv so aggregate CSV rows preserve
dataset language. Either add a language column to the aggregate CSV schema and
populate it at both writer call sites, or include the language in the checkpoint
identifier passed to the writer; ensure multilingual runs remain distinguishable
for the same checkpoint and dataset.
- Line 346: Update the JSON output file opening in the code surrounding
json.dump to explicitly use UTF-8 encoding, while preserving ensure_ascii=False
and the existing serialization behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 8ac73b20-ae4a-4cc4-b90f-643f91629d82

📥 Commits

Reviewing files that changed from the base of the PR and between 8c22fde and d24281c.

📒 Files selected for processing (7)
  • examples/tts/magpietts_inference.py
  • scripts/tts_comparison_report/README.md
  • scripts/tts_comparison_report/reporting/constants.py
  • scripts/tts_comparison_report/reporting/helpers.py
  • scripts/tts_comparison_report/reporting/orchestrator.py
  • scripts/tts_comparison_report/templates/audio_report.jinja
  • scripts/tts_comparison_report/templates/eval_report.jinja

Comment on lines +219 to +221
full_checkpoint_name = (
f"{checkpoint_name}_{moe_info}{inference_config.build_identifier()}_SV_{eval_config.sv_model}"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Preserve language in aggregate CSV identity.

full_checkpoint_name no longer contains the dataset language, but append_metrics_to_csv still writes it at Lines 349 and 376 while the CSV schema has no language column. Multilingual runs can therefore produce indistinguishable aggregate rows for the same checkpoint and dataset. Add a language column or pass a language-qualified checkpoint identifier to the aggregate CSV writer.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/tts/magpietts_inference.py` around lines 219 - 221, Update the
checkpoint identity flow around full_checkpoint_name and append_metrics_to_csv
so aggregate CSV rows preserve dataset language. Either add a language column to
the aggregate CSV schema and populate it at both writer call sites, or include
the language in the checkpoint identifier passed to the writer; ensure
multilingual runs remain distinguishable for the same checkpoint and dataset.

sorted_filewise = sorted(filewise_metrics, key=lambda x: x.get('cer', 0), reverse=True)
with open(os.path.join(eval_dir, f"{dataset}_filewise_metrics_{repeat_idx}.json"), "w") as f:
json.dump(sorted_filewise, f, indent=4)
json.dump(sorted_filewise, f, indent=4, ensure_ascii=False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Open the JSON file with an explicit UTF-8 encoding.

ensure_ascii=False writes Unicode characters directly, but the surrounding open(..., "w") uses the platform locale. On non-UTF-8 environments this can raise UnicodeEncodeError or corrupt the intended raw text.

Proposed fix
-            with open(os.path.join(eval_dir, f"{dataset}_filewise_metrics_{repeat_idx}.json"), "w") as f:
+            with open(
+                os.path.join(eval_dir, f"{dataset}_filewise_metrics_{repeat_idx}.json"),
+                "w",
+                encoding="utf-8",
+            ) as f:
                 json.dump(sorted_filewise, f, indent=4, ensure_ascii=False)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
json.dump(sorted_filewise, f, indent=4, ensure_ascii=False)
with open(
os.path.join(eval_dir, f"{dataset}_filewise_metrics_{repeat_idx}.json"),
"w",
encoding="utf-8",
) as f:
json.dump(sorted_filewise, f, indent=4, ensure_ascii=False)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/tts/magpietts_inference.py` at line 346, Update the JSON output file
opening in the code surrounding json.dump to explicitly use UTF-8 encoding,
while preserving ensure_ascii=False and the existing serialization behavior.

@XuesongYang XuesongYang self-requested a review July 16, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants