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

[LibriSpeech] Fix dev split local_extracted_archive for 'all' config #4904

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

sanchit-gandhi
Copy link
Contributor

We define the keys for the _DL_URLS of the dev split as dev.clean and dev.other:

"dev.clean": _DL_URL + "dev-clean.tar.gz",
"dev.other": _DL_URL + "dev-other.tar.gz",

These keys get forwarded to the dl_manager and thus the local_extracted_archive.

However, when calling SplitGenerator for the dev sets, we query the local_extracted_archive keys validation.clean and validation.other:

"local_extracted_archive": local_extracted_archive.get("validation.clean"),

"local_extracted_archive": local_extracted_archive.get("validation.other"),

The consequence of this is that the local_extracted_archive arg passed to _generate_examples is always None, as the keys validation.clean and validation.other do not exists in the local_extracted_archive.

When defining the audio_file in _generate_examples, since local_extracted_archive is always None, we always omit the local_extracted_archive path from the audio_file path, even if in non-streaming mode:

audio_file = (
os.path.join(local_extracted_archive, audio_file)
if local_extracted_archive
else audio_file
)

Thus, audio_file will only ever be the streaming path (audio_file, not os.path.join(local_extracted_archive, audio_file)).

This PR fixes the .get() keys for the local_extracted_archive for the dev splits.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 27, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

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

Good catch, @sanchit-gandhi!!!

I'm just mentioning the original PR below, so that both are linked in GitHub.

@albertvillanova albertvillanova changed the title [LibriSpeech] Fix dev split local_extracted_archive for 'all' split [LibriSpeech] Fix dev split local_extracted_archive for 'all' config Aug 29, 2022
@albertvillanova
Copy link
Member

This PR fixes a bug introduced in:

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Good catch !

@albertvillanova albertvillanova merged commit 6b3f3ca into huggingface:main Aug 30, 2022
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.

4 participants