Skip to content

Commit

Permalink
fix(task): fix metadata preparation with missing validation subset
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-pages authored May 24, 2024
1 parent 5e03622 commit d327195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixes

- fix(task): fix wrong train/development split when training with (some) meta-protocols ([#1709](https://github.com/pyannote/pyannote-audio/issues/1709))
- fix(task): fix metadata preparation with missing validation subset ([@clement-pages](https://github.com/clement-pages/))

### Improvements

Expand Down
4 changes: 3 additions & 1 deletion pyannote/audio/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,9 @@ def prepare_data(self):
prepared_data["metadata-labels"] = np.array(unique_labels, dtype=np.str_)
unique_labels.clear()

self.prepare_validation(prepared_data)
if self.has_validation:
self.prepare_validation(prepared_data)

self.post_prepare_data(prepared_data)

# save prepared data on the disk
Expand Down

0 comments on commit d327195

Please sign in to comment.