Closed KitroAyra closed 1 year ago
同学你好,我在使用你代码的训练的时候出现以下bug,不知道同学是否遇到相同问题,可否帮忙解决~感谢! File "run_tagger.py", line 540, in main() File "run_tagger.py", line 523, in main metrics = trainer.evaluate() File "/home/gpq/span_ext/MultiSpanQA/src/trainer.py", line 59, in evaluate pred_file = self.post_process_function(eval_examples, eval_dataset, output.predictions) File "run_tagger.py", line 441, in post_processing_function pred_file = postprocess_tagger_predictions( File "/home/gpq/span_ext/MultiSpanQA/src/multispan_qa.py", line 197, in postprocess_tagger_predictions all_valid_logits = np.array(all_valid_logits) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (653,) + inhomogeneous part.
我也有这个问题,请问解决了吗?
你好,我不知道你的环境设置是怎样的,但是我用python=3.9 和最近的 transforemrs=4.28.1 没有复现这个bug。
同学你好,我在使用你代码的训练的时候出现以下bug,不知道同学是否遇到相同问题,可否帮忙解决~感谢! File "run_tagger.py", line 540, in
main()
File "run_tagger.py", line 523, in main
metrics = trainer.evaluate()
File "/home/gpq/span_ext/MultiSpanQA/src/trainer.py", line 59, in evaluate
pred_file = self.post_process_function(eval_examples, eval_dataset, output.predictions)
File "run_tagger.py", line 441, in post_processing_function
pred_file = postprocess_tagger_predictions(
File "/home/gpq/span_ext/MultiSpanQA/src/multispan_qa.py", line 197, in postprocess_tagger_predictions
all_valid_logits = np.array(all_valid_logits)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (653,) + inhomogeneous part.