# Error using Trainer with Colab notebook, anyone have a solution?

**URL:** <https://discuss.huggingface.co/t/error-using-trainer-with-colab-notebook-anyone-have-a-solution/157189>\
**Category:** 🤗Transformers\
**Created:** [May 29, 2025, 1:32am UTC](https://discuss.huggingface.co/t/error-using-trainer-with-colab-notebook-anyone-have-a-solution/157189 "2025-05-29T01:32:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 29, 2025, 4:39am UTC](https://discuss.huggingface.co/t/error-using-trainer-with-colab-notebook-anyone-have-a-solution/157189/2 "2025-05-29T04:39:45Z")

</div>

Perhaps `numpy>=2` issue…?

> [@ValueError: Unable to avoid copy while creating an array as requested](https://discuss.huggingface.co/t/valueerror-unable-to-avoid-copy-while-creating-an-array-as-requested/93584):
>
> I am doing the NLP course in Hugging Faces. In chapter 3 - Fine-tuning a pretrained model, subchapter 3 - Fine-tuning a model with the Trainer API, Under the “Evaluation” section, I’m trying to run the following code as specified in the course: import evaluate metric = evaluate.load("glue", "mrpc") metric.compute(predictions=preds, references=predictions.label\_ids) But when I run it, I’m getting the following ValueError ---------------------------------------------------------------------…

in Colab:

```auto
!pip install numpy==1.26.4

```

---

_[View the full topic](https://discuss.huggingface.co/t/error-using-trainer-with-colab-notebook-anyone-have-a-solution/157189)._
