Skip to content

qwix does not have a __version__ attribute! #177

@salfaris

Description

@salfaris

Hi Qwix team! Love the effort to complete the full JAX AI stack and I would like to contribute to this initiative.

Expected Behavior

I am expecting to have the version attribute like so:

import qwix
print(qwix.__version__)

# >> 0.1.4

Not having the version attribute hurts debugging because of the spaghetti of dependencies between Qwix, Tunix and Flax. I have just been debugging dependencies between these three packages in the last 1 hour!

The fix should be simple, just add this line to root __init__.py:

from importlib.metadata import PackageNotFoundError
from importlib.metadata import version

try:
  __version__ = version("qwix")  # match the name in pyproject.toml
except PackageNotFoundError:
  __version__ = "0.0.0.dev0"  # fallback for editable installs

I am happy to make a PR myself to resolve this if that's more preferred

Actual Behavior

Currently, this raises an AttributeError since version is not implemented.

Steps to Reproduce the Problem

Run the two lines:

import qwix
print(qwix.__version__)

Specifications

  • Version: 0.1.4
  • Platform: Kaggle machine (Linux) - doesn't matter in this case anyways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions