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

ERNIE中的text_generation训练报错 #910

Open
hello-word-1 opened this issue Jun 16, 2023 · 1 comment
Open

ERNIE中的text_generation训练报错 #910

hello-word-1 opened this issue Jun 16, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@hello-word-1
Copy link

配置信息:device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 11.2

报错信息:
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if arr.dtype == np.object:
ERROR: 06-16 14:18:42: custom_static_generation_trainer.py:113 * 14080 traceback.format_exc():Traceback (most recent call last):
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\trainer\custom_static_generation_trainer.py", line 55, in do_train
self.train_exe.run(fetch_list=[], return_numpy=True)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\parallel_executor.py", line 307, in run
return_numpy=return_numpy)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\executor.py", line 1262, in run
six.reraise(*sys.exc_info())
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\six.py", line 719, in reraise
raise value
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\executor.py", line 1260, in run
return_merged=return_merged)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\executor.py", line 1415, in _run_impl
return_merged=return_merged)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\executor.py", line 1065, in _run_parallel
tensors = exe.run(fetch_var_names, return_merged)._move_to_list()
ValueError: In user code:

File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\run_trainer_ernie_gen.py", line 121, in <module>
  run_trainer(_params)
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\run_trainer_ernie_gen.py", line 100, in run_trainer
  trainer = build_trainer(trainer_params_dict, dataset_reader, model, num_train_examples)
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\run_trainer_ernie_gen.py", line 83, in build_trainer
  trainer = trainer_class(params=params_dict, data_set_reader=dataset_reader, model=model)
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\trainer\custom_static_generation_trainer.py", line 27, in __init__
  BaseStaticTrainerErnieGen.__init__(self, params, data_set_reader, model)
File "D:\lenovo\ERNIE\ERNIE\erniekit\controller\static_trainer_ernie_gen.py", line 65, in __init__
  self.init_env_static()
File "D:\lenovo\ERNIE\ERNIE\erniekit\controller\static_trainer_ernie_gen.py", line 310, in init_env_static
  self.init_static_model_net()
File "D:\lenovo\ERNIE\ERNIE\erniekit\controller\static_trainer_ernie_gen.py", line 345, in init_static_model_net
  self.init_static_train_net()
File "D:\lenovo\ERNIE\ERNIE\erniekit\controller\static_trainer_ernie_gen.py", line 366, in init_static_train_net
  fields_dict, phase=InstanceName.TRAINING)
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\model\ernie_infilling_generation.py", line 133, in forward
  emb_dict = self.make_embedding(fields_dict, phase)
File "D:\lenovo\ERNIE\ERNIE\applications\tasks\text_generation\model\ernie_infilling_generation.py", line 383, in make_embedding
  two_stream=self.two_stream
File "D:\lenovo\ERNIE\ERNIE\erniekit\modules\ernie_gen.py", line 116, in __init__
  input_mask, gather_idx, role_ids, turn_ids)
File "D:\lenovo\ERNIE\ERNIE\erniekit\modules\ernie_gen.py", line 272, in _build_model
  role_ids=role_ids, turn_ids=turn_ids)
File "D:\lenovo\ERNIE\ERNIE\erniekit\modules\ernie_gen.py", line 204, in encode
  role_ids=role_ids[0], turn_ids=turn_ids[0])
File "D:\lenovo\ERNIE\ERNIE\erniekit\modules\ernie_gen.py", line 135, in _gen_input
  is_sparse=False)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\layers\nn.py", line 521, in embedding
  'padding_idx': padding_idx
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\layer_helper.py", line 43, in append_op
  return self.main_program.current_block().append_op(*args, **kwargs)
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\framework.py", line 3184, in append_op
  attrs=kwargs.get("attrs", None))
File "D:\tool\anaconda3\envs\erine-demo\lib\site-packages\paddle\fluid\framework.py", line 2224, in __init__
  for frame in traceback.extract_stack():

InvalidArgumentError: Tensor holds the wrong type, it holds int, but desires to be int64_t.
  [Hint: Expected valid == true, but received valid:0 != true:1.] (at ..\paddle/fluid/framework/tensor_impl.h:33)
  [operator < lookup_table > error]
@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reopen it. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant