Closed sabilmakbar closed 1 month ago
python -m tests.test_seacrowd seacrowd/sea_datasets/tha_lotus/tha_lotus.py --subset_id tha_lotus_closetalk_clean Traceback (most recent call last): File "/Users/faridadilazuarda/miniconda3/envs/env-seacrowd/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/faridadilazuarda/miniconda3/envs/env-seacrowd/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Users/faridadilazuarda/Documents/GitHub/seacrowd-datahub/tests/test_seacrowd.py", line 14, in <module> from seacrowd.utils.constants import Tasks, TASK_TO_SCHEMA, VALID_TASKS, VALID_SCHEMAS, SCHEMA_TO_FEATURES, TASK_TO_FEATURES File "/Users/faridadilazuarda/Documents/GitHub/seacrowd-datahub/seacrowd/__init__.py", line 1, in <module> from .utils.constants import Tasks File "/Users/faridadilazuarda/Documents/GitHub/seacrowd-datahub/seacrowd/utils/constants.py", line 40, in <module> class Tasks(Enum): File "/Users/faridadilazuarda/Documents/GitHub/seacrowd-datahub/seacrowd/utils/constants.py", line 131, in Tasks OPTICAL_CHARACTER_RECOGNITION = "OCR" File "/Users/faridadilazuarda/miniconda3/envs/env-seacrowd/lib/python3.10/enum.py", line 134, in __setitem__ raise TypeError('Attempted to reuse key: %r' % key) TypeError: Attempted to reuse key: 'OPTICAL_CHARACTER_RECOGNITION'
Hello, any idea what is the cause for this error? @sabilmakbar @holylovenia
Can you pull from master
and see if the error persists or not, @faridlazuarda? Previously constants.py
had duplicated lines for OPTICAL_CHARACTER_RECOGNITION
, that was what triggered the error for me.
okay, thanks for the reviews, @holylovenia and @faridlazuarda
Closes #449
Checkbox
seacrowd/sea_datasets/tha_lotus/tha_lotus.py
(please use only lowercase and underscore for dataset folder naming, as mentioned in dataset issue) and its__init__.py
within{my_dataset}
folder._CITATION
,_DATASETNAME
,_DESCRIPTION
,_HOMEPAGE
,_LICENSE
,_LOCAL
,_URLs
,_SUPPORTED_TASKS
,_SOURCE_VERSION
, and_SEACROWD_VERSION
variables._info()
,_split_generators()
and_generate_examples()
in dataloader script.BUILDER_CONFIGS
class attribute is a list with at least oneSEACrowdConfig
for the source schema and one for a seacrowd schema.datasets.load_dataset
function.python -m tests.test_seacrowd seacrowd/sea_datasets/tha_lotus/tha_lotus.py --subset_id tha_lotus_closetalk_clean
python -m tests.test_seacrowd seacrowd/sea_datasets/tha_lotus/tha_lotus.py --subset_id tha_lotus_closetalk_office
python -m tests.test_seacrowd seacrowd/sea_datasets/tha_lotus/tha_lotus.py --subset_id tha_lotus_unidrection_clean
python -m tests.test_seacrowd seacrowd/sea_datasets/tha_lotus/tha_lotus.py --subset_id tha_lotus_unidrection_office