SEACrowd / seacrowd-datahub

A collaborative project to collect datasets in SEA languages, SEA regions, or SEA cultures.
Apache License 2.0
55 stars 54 forks source link

Closes #449 | Add/Update Dataloader Thai LOTUS #655

Closed sabilmakbar closed 1 month ago

sabilmakbar commented 2 months ago

Closes #449

Checkbox

holylovenia commented 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.

sabilmakbar commented 1 month ago

okay, thanks for the reviews, @holylovenia and @faridlazuarda