Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix balance #1787

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Fix balance #1787

wants to merge 1 commit into from

Conversation

FrenchKrab
Copy link
Contributor

@FrenchKrab FrenchKrab commented Nov 12, 2024

Fixes

  1. the new prepare_data implementation (which allows caching to file) changes how things are stored. The PR did not update [self.prepared_data["metadata"] -> [self.prepared_data["metadata-values"] in the segmentation mixin.
  2. when the combination of balanced key do not exist. For example when we have balance=['database','domain']), the implementation creates one sample generator for each possible combination (itertools.product of all values), but of course some combinations might not exist. To fix this, if the generator cannot produce anything, it returns a None as its first and only value (there might be a cleaner way).

I don't have time to really test but it should fix nttcslab-sp/mamba-diarization#6 !

EDIT: might or might not work with pyannote's latest versions, needs testing

1. with the new prepare_data
2. when the balanced key has different set of values for train and development protocols.
@FrenchKrab FrenchKrab marked this pull request as draft November 12, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytorch_lightning.Trainer.fit() error
1 participant