Skip to content

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Fixes no __version__ attribute #2188
  • Adds optimum/__init__.py with from .version import __version__ so that import optimum; optimum.__version__ works without raising AttributeError
  • Previously, __version__ was defined in optimum/version.py but was never re-exported at the package level since the top-level optimum/ directory had no __init__.py (namespace package)

Test plan

  • Verify import optimum; print(optimum.__version__) prints the version string instead of raising AttributeError
  • Verify existing imports (from optimum.version import __version__, etc.) continue to work
  • Run existing test suite to confirm no regressions

Add `__init__.py` to the top-level `optimum` package directory so that
`import optimum; optimum.__version__` works as expected. Previously,
`__version__` was only defined in `optimum/version.py` but never
re-exported at the package level, causing an `AttributeError`.

Fixes huggingface#2188
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.

no __version__ attribute

1 participant