problem with transcoder
Maruf13 opened this issue · 1 comments
showing below error
File "TransCoder/translate.py", line 171, in
translator = Translator(params)
File "TransCoder/translate.py", line 83, in init
encoder, decoder = build_model(self.reloaded_params, self.dico)
File "/content/TransCoder/XLM/src/model/init.py", line 181, in build_model
enc_path, map_location=lambda storage, loc: storage.cuda(params.local_rank))
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 787, in _legacy_load
result = unpickler.load()
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 743, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 830, in restore_location
result = map_location(storage, location)
File "/content/TransCoder/XLM/src/model/init.py", line 181, in
enc_path, map_location=lambda storage, loc: storage.cuda(params.local_rank))
File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 71, in _cuda
with torch.cuda.device(device):
File "/usr/local/lib/python3.7/dist-packages/torch/cuda/init.py", line 225, in enter
self.prev_idx = torch.cuda.current_device()
File "/usr/local/lib/python3.7/dist-packages/torch/cuda/init.py", line 432, in current_device
_lazy_init()
File "/usr/local/lib/python3.7/dist-packages/torch/cuda/init.py", line 172, in _lazy_init
torch._C._cuda_init()
Hi,
Your code contains enc_path, map_location=lambda storage, loc: storage.cuda(params.local_rank))
on line 181 in init.py while the current version is different and this line is not in the file.
Could you pull or reset to the main branch and try again?