Update files from the datasets library (from 1.4.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.4.0
- ted_talks_iwslt.py +5 -3
ted_talks_iwslt.py
CHANGED
@@ -16,7 +16,6 @@
|
|
16 |
|
17 |
from __future__ import absolute_import, division, print_function
|
18 |
|
19 |
-
import logging
|
20 |
import os
|
21 |
import xml.etree.ElementTree as ET
|
22 |
import zipfile
|
@@ -25,6 +24,9 @@ from collections import defaultdict
|
|
25 |
import datasets
|
26 |
|
27 |
|
|
|
|
|
|
|
28 |
# TODO: Add BibTeX citation
|
29 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
30 |
_CITATION = """\
|
@@ -342,8 +344,8 @@ class TedTalksIWSLT(datasets.GeneratorBasedBuilder):
|
|
342 |
source_ids = [talk.get("head")[0].get("talkid") for talk in source_talks]
|
343 |
target_ids = [talk.get("head")[0].get("talkid") for talk in target_talks]
|
344 |
except Exception as pe:
|
345 |
-
|
346 |
-
|
347 |
f"This likely means that you have a malformed XML file!\nEither {source} or {target}\n"
|
348 |
)
|
349 |
source_ids = list()
|
|
|
16 |
|
17 |
from __future__ import absolute_import, division, print_function
|
18 |
|
|
|
19 |
import os
|
20 |
import xml.etree.ElementTree as ET
|
21 |
import zipfile
|
|
|
24 |
import datasets
|
25 |
|
26 |
|
27 |
+
logger = datasets.logging.get_logger(__name__)
|
28 |
+
|
29 |
+
|
30 |
# TODO: Add BibTeX citation
|
31 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
32 |
_CITATION = """\
|
|
|
344 |
source_ids = [talk.get("head")[0].get("talkid") for talk in source_talks]
|
345 |
target_ids = [talk.get("head")[0].get("talkid") for talk in target_talks]
|
346 |
except Exception as pe:
|
347 |
+
logger.warning(f"ERROR: {pe}")
|
348 |
+
logger.warning(
|
349 |
f"This likely means that you have a malformed XML file!\nEither {source} or {target}\n"
|
350 |
)
|
351 |
source_ids = list()
|