Skip to content

no __version__ attribute #2188

@umbilnm

Description

@umbilnm

System Info

optimum version 1.24.0

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

import optimum
print(optimum.__version__)

Expected behavior

During development, I attempted to retrieve the library's version using the common convention of accessing the version attribute. However, I encountered an AttributeError indicating that the version attribute is not defined.

But it is available by using optimum.version.__version__. To enhance usability and align with common Python conventions, I suggest defining the __version__ attribute in the library's __init__.py file.

I am willing to submit a pull request to implement this enhancement if it is deemed appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions