Hi! I found a bug.
GLiNER.from_pretrained() raises FileNotFoundError when trying to load an onnx model.
Looking at the code of from_pretrained(), it checks for a pytorch model file before checking if load_onnx_model is set.
I think this check could be moved to the if not load_onnx_model: block.
I discovered the bug on v0.2.24, and it seems to have been introduced in v0.2.23.
Hi! I found a bug.
GLiNER.from_pretrained()raisesFileNotFoundErrorwhen trying to load an onnx model.Looking at the code of
from_pretrained(), it checks for a pytorch model file before checking ifload_onnx_modelis set.I think this check could be moved to the
if not load_onnx_model:block.I discovered the bug on v0.2.24, and it seems to have been introduced in v0.2.23.