Skip to content

Commit

Permalink
fix loading from non col checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
fschlatt committed Aug 7, 2024
1 parent b8c5a8a commit e17fcf2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lightning_ir/models/col/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def from_pretrained(cls, model_name_or_path: str | Path, *args, **kwargs) -> Lig
hf_hub_download(repo_id=str(model_name_or_path), filename="artifact.metadata")
except Exception:
return super().from_pretrained(model_name_or_path, *args, **kwargs)
finally:
return cls.from_colbert_checkpoint(model_name_or_path)
return cls.from_colbert_checkpoint(model_name_or_path)

@classmethod
def from_colbert_checkpoint(cls, model_name_or_path: Path | str) -> "ColModel":
Expand Down

0 comments on commit e17fcf2

Please sign in to comment.