Skip to content

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

Open
rlangman wants to merge 3 commits into
mainfrom
tts_report
Open

[TTS] Update multi-language eval report format#15915
rlangman wants to merge 3 commits 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.

Comment thread scripts/tts_comparison_report/reporting/constants.py Outdated
Comment thread scripts/tts_comparison_report/reporting/constants.py Outdated
Comment thread scripts/tts_comparison_report/reporting/helpers.py
Comment thread scripts/tts_comparison_report/templates/audio_report.jinja Outdated
Comment thread scripts/tts_comparison_report/templates/eval_report.jinja Outdated
Comment thread scripts/tts_comparison_report/README.md
@artem-gorodetskii

artem-gorodetskii commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

[RESOLVED] 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
Signed-off-by: Ryan <rlangman@nvidia.com>
Comment thread scripts/tts_comparison_report/reporting/helpers.py Fixed
Signed-off-by: Ryan <rlangman@nvidia.com>
jira_url = f"{JIRA_TICKET_URL_PREFIX}/{jira_id}"
task_url = f"{TICKET_URL_PREFIX}/{task_id}"

return 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.

The previous workflow was:

  • task_id was the internal task identifier. If not specified, it defaulted to DUMMY_TASK_ID. It was used in the S3 report name and this naming is important for maintenance: it allows us to remove reports for old tasks and to deprioritize reports without explicit task IDs.
  • jira_id was derived from task_id and used only for display in the report sidebar. If DUMMY_TASK_ID was used, jira_id became NEMOTTS, so the report still showed our Jira space.
  • jira_url was derived from JIRA_TICKET_URL_PREFIX and jira_id, so it always pointed to a valid page: either the real Jira ticket or, when no task ID was provided, the Jira project page.

Currently, task_id is being used for all three purposes:

  • S3 report naming,
  • displayed task ID in the report,
  • and construction of task_url.

As a result, when task_id is not specified, the report shows DUMMY_TASK_ID and generates a broken POR link.

If we want to keep task_id optional, the previous behavior should be preserved. In other words, we should keep separate values for:

  • the identifier used in S3 naming (actual POR ID or NMP-I-000),
  • the identifier displayed in the report (actual POR ID or something like NMP-I or NMP),
  • and the clickable URL (real POR ticket URL or the default TICKET_URL_PREFIX).

Sorry for the earlier misunderstanding.

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.

4 participants