You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi !
Thanks for reporting.
It looks like no object inherits from datasets.GeneratorBasedBuilder (or more generally from datasets.DatasetBuilder) in your script.
Could you check that there exist at least one dataset builder class ?
It happened when try to change the old project which use 'nlp' to new project which use 'datasets'. You should check you old 'my_squad.py' file, change the inherit class from nlp.xxx to datasets.xxx. Otherwise datasets - load.py - import_main_class() if inspect.isclass(obj) and issubclass(obj, main_cls_type): can not find the main_cls.
version: 1.0.2
The above code can works. However, when I download the squad.py from your server, and saved as
my_squad.py
to local. I run followings raise errors.TypeError Traceback (most recent call last)
in
----> 1 train_dataset = nlp.load_dataset('./my_squad.py')
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, script_version, **config_kwargs)
602 hash=hash,
603 features=features,
--> 604 **config_kwargs,
605 )
606
TypeError: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered: