From 317cd1fb5654c8be1f6291b7df10497da6c3e4fc Mon Sep 17 00:00:00 2001 From: hao <97079365+tanhaow@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:03:18 -0400 Subject: [PATCH 1/2] Update metrics.py --- src/muse/evaluation/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/muse/evaluation/metrics.py b/src/muse/evaluation/metrics.py index 0d7f773..43cda3a 100644 --- a/src/muse/evaluation/metrics.py +++ b/src/muse/evaluation/metrics.py @@ -139,6 +139,6 @@ def compute_cometkiwi( # Predict returns a Prediction object; access the first score model_output = model.predict(data, batch_size=1, gpus=gpus) # The Prediction object can be indexed to get individual scores - score = model_output[0] + score = model_output[0][0] return score From 4d4c6effbdef58a051ecbe71cc65b6112f47c77d Mon Sep 17 00:00:00 2001 From: hao <97079365+tanhaow@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:06:21 -0400 Subject: [PATCH 2/2] ruff format --- src/muse/evaluation/metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/muse/evaluation/metrics.py b/src/muse/evaluation/metrics.py index 43cda3a..2c07ef7 100644 --- a/src/muse/evaluation/metrics.py +++ b/src/muse/evaluation/metrics.py @@ -120,7 +120,9 @@ def compute_cometkiwi( try: model_path = download_model("Unbabel/wmt22-cometkiwi-da") LOADED_METRICS["cometkiwi"] = load_from_checkpoint(model_path) - except KeyError as e: # download_model catches all exceptions and re-raises as KeyError + except ( + KeyError + ) as e: # download_model catches all exceptions and re-raises as KeyError msg = ( "Authentication required for CometKiwi model. " "Please:\n"