Skip to content

Commit

Permalink
Fix numpy upgrade to 2.0.0 BUFSIZE import error (#5680)
Browse files Browse the repository at this point in the history
Numpy 2.0.0 removed the BUFSIZE API, replacing it with
'numpy._core.umath.BUFSIZE'.

The minimum numpy version supported by the new code is 1.26.1. If you
need to support the lower numpy version, please tell me and we can add
another path.

Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
  • Loading branch information
Yejing-Lai and loadams authored Jun 18, 2024
1 parent a4cd550 commit 4000cee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deepspeed/autotuning/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

import copy

from numpy import BUFSIZE
import numpy
if numpy.__version__ < '2.0.0':
from numpy import BUFSIZE
else:
from numpy._core.umath import BUFSIZE
import json
import subprocess
import sys
Expand Down

0 comments on commit 4000cee

Please sign in to comment.