Skip to content

Conversation

mralamdari
Copy link

Description

Pinned NumPy to version 1.24.3 to fix a compatibility issue with YOLOv8 in Google Colab. Colab’s default NumPy version (1.26.4) causes a ValueError: numpy.dtype size changed when importing YOLOv8 models built against NumPy 1.24.x.

Dependency:
numpy==1.24.3

List any dependencies that are required for this change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this change been tested, please provide a testcase or example of how you tested the change?

Tested in a fresh Google Colab environment by adding the fix to the top of the notebook and running all cells. YOLOv8 loaded and ran successfully with no dtype errors.

Any specific deployment considerations

None

Docs

None

YOLOv8 is built against NumPy 1.24.x, and newer versions (1.26.4) cause a “dtype size changed” error. Adding:

!pip uninstall -y numpy
!pip install numpy==1.24.3
at the top of train-yolov8-object-detection-on-custom-dataset.ipynb fixes that.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link

CLAassistant commented Jun 8, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants