From ae3b95b9b4a3bc614f31c67b8d25f53f96e0b10c Mon Sep 17 00:00:00 2001 From: Samuel Cahyawijaya Date: Sat, 27 Aug 2022 14:22:04 +0800 Subject: [PATCH] bug fix & fix compatibility issue --- nusantara/nusa_datasets/titml_idn/titml_idn.py | 2 +- nusantara/utils/constants.py | 2 +- requirements.txt | 5 +++-- tests/test_nusantara.py | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nusantara/nusa_datasets/titml_idn/titml_idn.py b/nusantara/nusa_datasets/titml_idn/titml_idn.py index 9efccd99..ab7e831e 100644 --- a/nusantara/nusa_datasets/titml_idn/titml_idn.py +++ b/nusantara/nusa_datasets/titml_idn/titml_idn.py @@ -83,7 +83,7 @@ def _info(self): homepage=_HOMEPAGE, license=_LICENSE, citation=_CITATION, - task_templates=[datasets.AutomaticSpeechRecognition(audio_file_path_column="audio", transcription_column="text")], + task_templates=[datasets.AutomaticSpeechRecognition(audio_column="audio", transcription_column="text")], ) def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]: diff --git a/nusantara/utils/constants.py b/nusantara/utils/constants.py index ba049812..58df5264 100644 --- a/nusantara/utils/constants.py +++ b/nusantara/utils/constants.py @@ -3,7 +3,7 @@ from collections import defaultdict from nusantara.utils.schemas import ( kb_features, qa_features, text2text_features, text_features, - text_multi_features, pairs_features, seq_label_features, + text_multi_features, pairs_features, pairs_features_score, seq_label_features, ssp_features, speech_text_features, image_text_features ) diff --git a/requirements.txt b/requirements.txt index a160f1d7..be26faaa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ bioc==1.3.7 pandas==1.3.3 numpy>=1.22 pybrat==0.1.4 -datasets==2.0.0 +datasets==2.2.0 black~=22.0 flake8>=3.8.3 isort>=5.0.0 @@ -12,4 +12,5 @@ pre-commit==2.19.0 soundfile librosa jsonlines>=3.1.0 -nltk \ No newline at end of file +nltk +soundfile \ No newline at end of file diff --git a/tests/test_nusantara.py b/tests/test_nusantara.py index 89a80b98..5e012335 100644 --- a/tests/test_nusantara.py +++ b/tests/test_nusantara.py @@ -13,7 +13,6 @@ from datasets import DatasetDict, Features from nusantara.utils.constants import Tasks, TASK_TO_SCHEMA, VALID_TASKS, VALID_SCHEMAS, SCHEMA_TO_FEATURES, TASK_TO_FEATURES from nusantara.utils.schemas import kb_features, pairs_features, pairs_features_score, qa_features, text2text_features, text_features, text_multi_features, seq_label_features, ssp_features, speech_text_features, image_text_features -(pairs_score); Remove redundancy for ImageText (imtext) schema; Modify TITML-IDN to use sptext schema;) sys.path.append(str(Path(__file__).parent.parent))