Translation
Transformers
Inference Endpoints

Hello, what version of COMET should I use to use Unbabel/wmt22-cometkiwi-da? I used the Hugging Face posted code and got KeyError: "Model 'Unbabel/wmt22-cometkiwi-da' not supported by COMET."

#3
by November11 - opened

Hello, what version of COMET should I use to use Unbabel/wmt22-cometkiwi-da? I used the Hugging Face posted code and got KeyError: "Model 'Unbabel/wmt22-cometkiwi-da' not supported by COMET."

Unbabel org

CometKiwi models should run on unbabel-comet>=2.0. Your error is most probably because you have not acknowledge it's license. You have to acknowledge its license and then run the following:

huggingface-cli login
# or using an environment variable
huggingface-cli login --token $HUGGINGFACE_TOKEN

Then you should be able to run the model.

This comment has been hidden

I face the same issue.

I am on Python 3.10 and unbabel-comet==2.2.2.

The License has been accepted and I have downloaded "Unbabel/wmt22-comet-da" with no problems. However, with the same steps, i cannot download "Unbabel/wmt22-cometkiwi-da"
SCR-20240425-kcic.png

Hi,
I have a similar problem. My comet version is "version = "2.2.2" " and I use Python 3.11.
I have accepted the license and logged in to Huggingface on my computer.
Still, I receive the error message..

My comet version is "version = "2.2.2" " and I use Python 3.10.12

pip install --upgrade pip
pip install unbabel-comet
from comet import download_model, load_from_checkpoint
model_path = download_model("Unbabel/wmt22-comet-da")
model = load_from_checkpoint(model_path)
data = [
   {
        "src": "Dem Feuer konnte Einhalt geboten werden",
        "mt": "The fire could be stopped",
        "ref": "They were able to control the fire."
    },
    {
        "src": "Schulen und Kindergärten wurden eröffnet.",
        "mt": "Schools and kindergartens were open",
        "ref": "Schools and kindergartens opened"
    }
]
model_output = model.predict(data, batch_size=8, gpus=1)
print (model_output)

I checked my code and it still works.there is the demo ,maybe you can have a try.

Hi,
I realized that my token was missing the permission to read gated models:

image.png

It now works :)

Sign up or log in to comment