Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions colpali_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
from importlib.metadata import PackageNotFoundError, version

from .models import *

try:
Copy link
Copy Markdown
Collaborator

@ManuelFay ManuelFay Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things:

  1. I would assume you need the pypy distribution name right ? so colpali-engine and not colpali_engine

  2. the other imports surely need to be under, it feels like there could be some dangerous behavior in the future if any model files use some branching based on versions.

Proposed fix:

from importlib.metadata import PackageNotFoundError, version

try:
    __version__ = version("colpali-engine")
except PackageNotFoundError:
    __version__ = "0.0.0"

from .models import * 

__version__ = version("colpali_engine")
except PackageNotFoundError:
__version__ = "0.0.0"