Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Can't instantiate abstract class MapDataset with abstract methods _inputs, set_inputs #104

Open
zhuchenxi opened this issue Jul 27, 2021 · 1 comment

Comments

@zhuchenxi
Copy link

zhuchenxi commented Jul 27, 2021

When I run:
thumt-trainer
--input corpus.tc.32k.zh.shuf corpus.tc.32k.en.shuf
--vocabulary vocab.32k.zh.txt vocab.32k.en.txt
--model transformer
--validation newsdev2017.tc.32k.zh
--references newsdev2017.tc.en
--parameters=batch_size=4096,device_list=[0,1,2,3],update_cycle=2
--hparam_set base

I have got this error message:
Traceback (most recent call last):
File "/gruntdata7/mike.zcx/ENV/lib64/python3.6/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap
fn(i, *args)
File "/gruntdata9/mike.zcx/translate/THUMT/thumt/bin/trainer.py", line 496, in process_fn
main(local_args)
File "/gruntdata9/mike.zcx/translate/THUMT/thumt/bin/trainer.py", line 406, in main
dataset = data.MTPipeline.get_train_dataset(params.input, params)
File "/gruntdata9/mike.zcx/translate/THUMT/thumt/data/pipeline.py", line 108, in get_train_dataset
dataset = dataset.map(map_obj)
File "/gruntdata9/mike.zcx/translate/THUMT/thumt/data/dataset.py", line 82, in map
return MapDataset(self, fn)
File "/usr/lib64/python3.6/typing.py", line 1231, in new
return _generic_new(cls.next_in_mro, cls, *args, **kwds)
File "/usr/lib64/python3.6/typing.py", line 1186, in _generic_new
return base_cls.new(cls)
TypeError: Can't instantiate abstract class MapDataset with abstract methods _inputs, set_inputs

what can I do to handle this problem? Thanks very much.

@zhuchenxi
Copy link
Author

My Python Version: 3.6.8
My Torch Version: 1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant