Add deprecation warning
#4
by
reach-vb
HF Staff
- opened
- README.md +4 -0
- common_voice.py +11 -0
README.md
CHANGED
|
@@ -2963,6 +2963,10 @@ dataset_info:
|
|
| 2963 |
|
| 2964 |
# Dataset Card for common_voice
|
| 2965 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2966 |
## Table of Contents
|
| 2967 |
- [Dataset Description](#dataset-description)
|
| 2968 |
- [Dataset Summary](#dataset-summary)
|
|
|
|
| 2963 |
|
| 2964 |
# Dataset Card for common_voice
|
| 2965 |
|
| 2966 |
+
<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">
|
| 2967 |
+
<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> organisation instead. For example, you can load <a href="https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0">Common Voice 11</a> dataset via <code>load_dataset("mozilla-foundation/common_voice_11_0", "en")</code></p>
|
| 2968 |
+
</div>
|
| 2969 |
+
|
| 2970 |
## Table of Contents
|
| 2971 |
- [Dataset Description](#dataset-description)
|
| 2972 |
- [Dataset Summary](#dataset-summary)
|
common_voice.py
CHANGED
|
@@ -16,6 +16,7 @@
|
|
| 16 |
|
| 17 |
|
| 18 |
import os
|
|
|
|
| 19 |
|
| 20 |
import datasets
|
| 21 |
from datasets.tasks import AutomaticSpeechRecognition
|
|
@@ -629,6 +630,16 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
|
|
| 629 |
]
|
| 630 |
|
| 631 |
def _info(self):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
features = datasets.Features(
|
| 633 |
{
|
| 634 |
"client_id": datasets.Value("string"),
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
import os
|
| 19 |
+
import warnings
|
| 20 |
|
| 21 |
import datasets
|
| 22 |
from datasets.tasks import AutomaticSpeechRecognition
|
|
|
|
| 630 |
]
|
| 631 |
|
| 632 |
def _info(self):
|
| 633 |
+
|
| 634 |
+
warnings.warn(
|
| 635 |
+
"""
|
| 636 |
+
This version of the Common Voice dataset is deprecated.
|
| 637 |
+
You can download the latest one with
|
| 638 |
+
>>> load_dataset(\"mozilla-foundation/common_voice_11_0\", \"en\")
|
| 639 |
+
""",
|
| 640 |
+
FutureWarning,
|
| 641 |
+
)
|
| 642 |
+
|
| 643 |
features = datasets.Features(
|
| 644 |
{
|
| 645 |
"client_id": datasets.Value("string"),
|