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
作者您好,我下载了readme链接上的数据,并将数据文件夹改名为"AliOpenKG500",尝试运行GenKGC中的openbg.sh,会报错:缺失features_train.txt;
之后把文件夹命名回OpenBG500,并相应地修改data_dir配置(其他不变),重新运行脚本会有如下报错:
File "D:\resource\PromptKG\research\GenKGC\main.py", line 156, in
main()
File "D:\resource\PromptKG\research\GenKGC\main.py", line 138, in main
trainer.fit(lit_model, datamodule=data)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 458, in fit
self._run(model)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 756, in _run
self.dispatch()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 797, in dispatch
self.accelerator.start_training(self)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 96, in start_training
self.training_type_plugin.start_training(trainer)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\plugins\training_type\training_type_plugin.py", line 144, in start_training
self._results = trainer.run_stage()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 807, in run_stage
return self.run_train()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 842, in run_train
self.run_sanity_check(self.lightning_module)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 1107, in run_sanity_check
self.run_evaluation()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 962, in run_evaluation
output = self.evaluation_loop.evaluation_step(batch, batch_idx, dataloader_idx)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\evaluation_loop.py", line 174, in evaluation_step
output = self.trainer.accelerator.validation_step(args)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 221, in validation_step
batch = self.to_device(args[0])
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\gpu.py", line 69, in to_device
batch = super().to_device(batch)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 394, in to_device
return self.batch_to_device(batch, self.root_device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 177, in batch_to_device
return model._apply_batch_transfer_handler(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\core\lightning.py", line 216, in _apply_batch_transfer_handler
batch = self.transfer_batch_to_device(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\core\hooks.py", line 704, in transfer_batch_to_device
return move_data_to_device(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 161, in move_data_to_device
return apply_to_collection(batch, dtype=dtype, function=batch_to)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 84, in apply_to_collection
return function(data, *args, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 158, in batch_to
return data.to(device, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\file_utils.py", line 1639, in wrapper
return func(*args, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\tokenization_utils_base.py", line 738, in to
self.data = {k: v.to(device=device) for k, v in self.data.items()}
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\tokenization_utils_base.py", line 738, in
self.data = {k: v.to(device=device) for k, v in self.data.items()}
AttributeError: 'list' object has no attribute 'to'
我的transformers版本是4.7.0,请问这个问题怎么解决,您可以帮忙看下吗
The text was updated successfully, but these errors were encountered:
作者您好,我下载了readme链接上的数据,并将数据文件夹改名为"AliOpenKG500",尝试运行GenKGC中的openbg.sh,会报错:缺失features_train.txt;
之后把文件夹命名回OpenBG500,并相应地修改data_dir配置(其他不变),重新运行脚本会有如下报错:
File "D:\resource\PromptKG\research\GenKGC\main.py", line 156, in
main()
File "D:\resource\PromptKG\research\GenKGC\main.py", line 138, in main
trainer.fit(lit_model, datamodule=data)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 458, in fit
self._run(model)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 756, in _run
self.dispatch()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 797, in dispatch
self.accelerator.start_training(self)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 96, in start_training
self.training_type_plugin.start_training(trainer)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\plugins\training_type\training_type_plugin.py", line 144, in start_training
self._results = trainer.run_stage()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 807, in run_stage
return self.run_train()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 842, in run_train
self.run_sanity_check(self.lightning_module)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 1107, in run_sanity_check
self.run_evaluation()
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 962, in run_evaluation
output = self.evaluation_loop.evaluation_step(batch, batch_idx, dataloader_idx)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\trainer\evaluation_loop.py", line 174, in evaluation_step
output = self.trainer.accelerator.validation_step(args)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 221, in validation_step
batch = self.to_device(args[0])
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\gpu.py", line 69, in to_device
batch = super().to_device(batch)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 394, in to_device
return self.batch_to_device(batch, self.root_device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\accelerators\accelerator.py", line 177, in batch_to_device
return model._apply_batch_transfer_handler(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\core\lightning.py", line 216, in _apply_batch_transfer_handler
batch = self.transfer_batch_to_device(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\core\hooks.py", line 704, in transfer_batch_to_device
return move_data_to_device(batch, device)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 161, in move_data_to_device
return apply_to_collection(batch, dtype=dtype, function=batch_to)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 84, in apply_to_collection
return function(data, *args, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 158, in batch_to
return data.to(device, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\file_utils.py", line 1639, in wrapper
return func(*args, **kwargs)
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\tokenization_utils_base.py", line 738, in to
self.data = {k: v.to(device=device) for k, v in self.data.items()}
File "D:\softwares\anaconda\envs\genkgc\lib\site-packages\transformers\tokenization_utils_base.py", line 738, in
self.data = {k: v.to(device=device) for k, v in self.data.items()}
AttributeError: 'list' object has no attribute 'to'
我的transformers版本是4.7.0,请问这个问题怎么解决,您可以帮忙看下吗
The text was updated successfully, but these errors were encountered: