Skip to content

Fix: Add missing verbose argument to vprint in ColBERTModel#63

Merged
bclavie merged 1 commit into
AnswerDotAI:mainfrom
chaosisnotrandomitisrhythmic:fix/colbert-vprint-argument
Apr 1, 2025
Merged

Fix: Add missing verbose argument to vprint in ColBERTModel#63
bclavie merged 1 commit into
AnswerDotAI:mainfrom
chaosisnotrandomitisrhythmic:fix/colbert-vprint-argument

Conversation

@chaosisnotrandomitisrhythmic

@chaosisnotrandomitisrhythmic chaosisnotrandomitisrhythmic commented Mar 24, 2025

Copy link
Copy Markdown
Contributor

Issue

The vprint call in ColBERTModel.__init__ was missing its required verbose argument, which causes a TypeError. The function requires two arguments:

  • The message to print
  • The verbose level

Reproduction

The error can be reproduced with this simple code:

from rerankers import Reranker

reranker = Reranker(
    model_name="answerdotai/answerai-colbert-small-v1",
    model_type="colbert",
)

# >>> TypeError: vprint() missing 1 required positional argument: 'verbose'

Breaking change

Looks like the bug was introduced in Commit 20be7bb

Changes

  • Added the missing verbose parameter to the vprint call in ColBERTModel.__init__
  • Made verbose a required parameter in ColBERTModel.__init__ to ensure proper initialization

Testing

The fix ensures that logging behavior works as expected when initializing ColBERTModel instances. The model should now correctly respect the verbose level setting.

cc @ @bclavie thanks a lot for all the great work 🙌

@chaosisnotrandomitisrhythmic chaosisnotrandomitisrhythmic changed the title fix: Add missing verbose argument to vprint in ColBERTModel Fix: Add missing verbose argument to vprint in ColBERTModel Mar 24, 2025
@bclavie

bclavie commented Apr 1, 2025

Copy link
Copy Markdown
Collaborator

Thank you so much! My bad for the oversight :( releasing as 0.9.1post1 now!

@bclavie bclavie merged commit dbfa8a8 into AnswerDotAI:main Apr 1, 2025
seanmacavaney pushed a commit to seanmacavaney/rerankers that referenced this pull request Jun 25, 2026
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.

2 participants