raceback (most recent call last):████████████████████████████████████████████████████████████████████████| 9/9 [00:03<00:00, 2.66it/s]
File "/home/cloudadmin/test-sample/test_chatglm/MedicalGPT/reward_modeling.py", line 649, in <module>
main()
File "/home/cloudadmin/test-sample/test_chatglm/MedicalGPT/reward_modeling.py", line 621, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 1539, in train
return inner_training_loop(
File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 1901, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 2226, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/home/cloudadmin/test-sample/test_chatglm/MedicalGPT/reward_modeling.py", line 264, in evaluate
return super().evaluate(eval_dataset=eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 2934, in evaluate
output = eval_loop(
File "/opt/conda/lib/python3.10/site-packages/transformers/trainer.py", line 3222, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/home/cloudadmin/test-sample/test_chatglm/MedicalGPT/reward_modeling.py", line 184, in compute_metrics
mse = mean_squared_error(labels, preds)
File "/opt/conda/lib/python3.10/site-packages/sklearn/metrics/_regression.py", line 442, in mean_squared_error
y_type, y_true, y_pred, multioutput = _check_reg_targets(
File "/opt/conda/lib/python3.10/site-packages/sklearn/metrics/_regression.py", line 101, in _check_reg_targets
y_true = check_array(y_true, ensure_2d=False, dtype=dtype)
File "/opt/conda/lib/python3.10/site-packages/sklearn/utils/validation.py", line 915, in check_array
raise ValueError(
ValueError: Found array with dim 3. None expected <= 2.
@@ -44,6 +45,7 @@ MODEL_CLASSES = { "bloom": (AutoConfig, BloomForSequenceClassification, BloomTokenizerFast), "llama": (AutoConfig, LlamaForSequenceClassification, LlamaTokenizer), "baichuan": (AutoConfig, LlamaForSequenceClassification, AutoTokenizer),
执行的指令为,机器是 A100 40G: