Dataset Viewer issue: Raises syntax errors of previous builder script version.

#1
by felixm - opened
Språkbanken Text org

The dataset viewer is not working for my datasets and it's impossible to debug it as the traceback only gives me error messages from a previous version of the script. See how line 174 here does not correspond to the latest version of the script (https://huggingface.co/datasets/sbx/superlim-2/blob/1889f0bd14a9c6ce94f4b46cd2241ed89fcb7260/superlim-2.py#L174). I can download the data just fine using the datasets library. Could this be a bug of the datasets viewer API?

Error details:

Error code:   SplitsNamesError
Exception:    SyntaxError
Message:      invalid syntax (superlim-2.py, line 174)
Traceback:    Traceback (most recent call last):
                File "/src/workers/datasets_based/src/datasets_based/workers/first_rows.py", line 469, in compute_first_rows_response
                  split_full_names = get_dataset_split_full_names(dataset=dataset, use_auth_token=use_auth_token)
                File "/src/workers/datasets_based/src/datasets_based/workers/first_rows.py", line 390, in get_dataset_split_full_names
                  for config in get_dataset_config_names(path=dataset, use_auth_token=use_auth_token)
                File "/src/workers/datasets_based/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 332, in get_dataset_config_names
                  builder_cls = import_main_class(dataset_module.module_path)
                File "/src/workers/datasets_based/.venv/lib/python3.9/site-packages/datasets/load.py", line 116, in import_main_class
                  module = importlib.import_module(module_path)
                File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
                  return _bootstrap._gcd_import(name[level:], package, level)
                File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
                File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
                File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
                File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
                File "<frozen importlib._bootstrap_external>", line 846, in exec_module
                File "<frozen importlib._bootstrap_external>", line 983, in get_code
                File "<frozen importlib._bootstrap_external>", line 913, in source_to_code
                File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
                File "/tmp/modules-cache/datasets_modules/datasets/sbx--superlim-2/a606cee58c4e8ebfe2b993df02697c23b924445a45ba4adc20420597da8c98e4/superlim-2.py", line 174
                  datasets.BuilderConfig(name="swediagnostics", version=VERSION, description=_SweDiag_DESCRIPTION),
                  ^
              SyntaxError: invalid syntax

cc @albertvillanova @lhoestq @severo .

Språkbanken Text org

The data previewer works again. Without any changes on my part.

felixm changed discussion status to closed

It took some time to use the latest version ;)

Sign up or log in to comment