Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Not compatible with numpy >= 1.24.0聽#4945

Open

Description

@amathews-amd

馃悰 Bug

Numpy >=1.24.0 deprecated np.float and similar aliases. See https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971
Fairseq with newer versions of numpy fail with error AttributeError: module 'numpy' has no attribute 'float'

Environment

  • fairseq Version (e.g., 1.0 or main): main
  • OS (e.g., Linux): Linux
  • How you installed fairseq (pip, source): wource

Activity

  1. atosborges00 commented on Apr 13, 2023

    @atosborges00

    I'm having the same problem using fairseq 0.10.0 and numpy 1.24.2

  2. SBalza commented on May 3, 2023

    @SBalza

    For now, solution is to downgrade to numpy=1.23.3 while the package is updated:
    np.float has to be changed to float throughout.

  3. added a commit that references this issue on Feb 5, 2026
    76bd73d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions