Add deprecation warning

#4
by reach-vb HF staff - opened

It'd be better to move away from canonical datasets and push the usage towards datasets hosted under an organisation.

We are already doing this with multilingual_librispeech, only makes sense to do this for common voice as well.

Note: That currently I link to the latest available CV split on the hub CV11, this should be updated when we add CV12.

cc: @albertvillanova @polinaeterna @sanchit-gandhi

SGTM! Could we also add a warning to the README.md as well? Similar to https://huggingface.co/datasets/multilingual_librispeech

This way users will see a deprecation warning prior to downloading the dataset (as well as when downloading the dataset) -> this should help new users migrate to CV12 before committing to using common_voice

Legacy Datasets org

Thanks for taking care of this, @reach-vb !

Could you have a look at this similar deprecation? https://huggingface.co/datasets/albertvillanova/pmc_open_access/discussions/3/files

  • Better passing FutureWarning as category to warnings.warn, instead of default UserWarning
  • Also we could mention that the deprecated dataset will be eventually deleted (even if thi can take very long, until all users have stopped using it)
  • And as suggested by @sanchit-gandhi , also better adding a warning message to the README:
    • Maybe in this message we could tell the users to use CV12 or any of the other CV versions under the "mozilla-foundation" organization?

Done and done @sanchit-gandhi & @albertvillanova - Does this look good to you both? :)
cc: @polinaeterna

@reach-vb awesome! I just got an idea: can we also add the code instructions on how to load CV in the datasets (the python command load_dataset(...)) directly in the warning div of the readme? Not sure if this might look nicely but worth checking?

Maybe in this message we could tell the users to use CV12 or any of the other CV versions under the "mozilla-foundation" organization?

I also thought that maybe we should redirect to the organization, not to the specific version of the dataset. The cumulative number of downloads of other versions of CV for the last month is like 1.7k (not big comparing to 25k of CV11 but still).
smth like:

<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
<p><b>Deprecated:</b> Dataset "common_voice" is deprecated and will soon be deleted. Use datasets under <a href="https://huggingface.co/mozilla-foundation">mozilla-foundation</a> organization instead. For example, to load <a href="https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0"> Common Voice 11</a> run `load_dataset("mozilla-foundation/common_voice_11_0", "en")`</p>
</div>

But I wouldn't insisting on these two points, it looks good to me as is, so what do you think @reach-vb ?

Legacy Datasets org

Some nits:

  • I would prefer not to mention "the latest one" in the warning message. That way, we will not need to update the warning if a newer version of Common Voice is released.
  • If you add a code suggestion to the README, please do not use backticks, but the <code> tag instead:
    <code>load_dataset("mozilla-foundation/common_voice_11_0", "en")</code>
    

I like @polinaeterna 's suggestion with the deprecation warning! Otherwise LGTM 👍

Brilliant suggestion @polinaeterna and @albertvillanova - I've made the changes. Can one of you please merge this PR if it looks okay to you?

@reach-vb Awesome thank you!

polinaeterna changed pull request status to merged

Sign up or log in to comment