Skip to content
Draft
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/tts/magpietts_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,10 @@ def run_inference_and_evaluation(
with open(os.path.join(eval_dir, f"{dataset}_metrics_{repeat_idx}.json"), "w") as f:
json.dump(metrics, f, indent=4)

# Sort by CER descending for human-readable output (highest error first)
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(filewise_metrics, f, indent=4)
json.dump(sorted_filewise, f, indent=4)

# Append to per-run CSV
append_metrics_to_csv(per_run_csv, full_checkpoint_name, dataset, metrics)
Expand Down
Loading
Loading