stanford-futuredata / ColBERT

ColBERT: state-of-the-art neural search (SIGIR'20, TACL'21, NeurIPS'21, NAACL'22, CIKM'22, ACL'23, EMNLP'23)
MIT License
2.68k stars 355 forks source link

FIX: Catch-all for hugging face errors #288

Closed bclavie closed 6 months ago

bclavie commented 6 months ago

@okhat Fixing an error I introduced myself in #284, where in rare cases, other hugging face errors than just the caught one can be thrown (mostly when loading from an index rather than a checkpoint). I think while it's usually bad practice, having a catch-all except: here is pretty safe!

okhat commented 6 months ago

Maybe we should make it catch “except Exception:”?

the current update will catch even ctrl-c

bclavie commented 6 months ago

Fair! I assumed it'd be fairly safe (it runs very quickly) but that could be annoying if there's a hangup, change to except Exception 👍