Skip to content

Commit

Permalink
Fix bug with latest version of Transformers and model registry, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Feb 17, 2025
1 parent a92bb73 commit 8a3ed27
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/python/txtai/models/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ def register(model, config=None):
config: config class name
"""

# Default config class name to model name if not provided
name = model.__class__.__name__
if not config:
config = name
# Default config class to model class if not provided
config = config if config else model.__class__

# Default model config_class if empty
if hasattr(model.__class__, "config_class") and not model.__class__.config_class:
Expand Down

0 comments on commit 8a3ed27

Please sign in to comment.