Unbabel / COMET

A Neural Framework for MT Evaluation
https://unbabel.github.io/COMET/html/index.html
Apache License 2.0
453 stars 72 forks source link

Re-add support for older models on AWS #142

Closed BramVanroy closed 1 year ago

BramVanroy commented 1 year ago

It seems that in v2 the intention was to move all model infrastructure to Hugging Face hub. As a consequence, I could not easily find how to use the older models that were available in v1.

This PR re-implements support for the older models that would then be downloaded from AWS for backward-compatbility.

Technically it works by first checking if a given model is available on the HF hub (which is the primary data source) and if not, we back off to the AWS model to find the model there. If the model is not found there, we throw an exception.

I have added tests to test AWS moel download as well as unknown model failure assertion.

closes #141

ricardorei commented 1 year ago

Hi @BramVanroy,

Thanks for the PR. This seems like a good idea