TypeError: Can't instantiate abstract class MapDataset with abstract methods _inputs, set_inputs
zhuchenxi opened this issue · 1 comments
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.
My Python Version: 3.6.8
My Torch Version: 1.8.0