From 7cd161a7019f501d03a4ed4fd8d89c1905876d3b Mon Sep 17 00:00:00 2001 From: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Date: Fri, 2 May 2025 12:45:36 +0400 Subject: [PATCH] fix: truncate model identifier in case model name is too long --- eval/eval.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eval/eval.py b/eval/eval.py index ef561e04..349963a3 100644 --- a/eval/eval.py +++ b/eval/eval.py @@ -462,7 +462,14 @@ def initialize_model( else: lm = model - lm.model_identifier = sanitize_model_name(f"model_{model}_model_args_{model_args}") + # For model names that are too long, truncate them to avoid issues with storage + if len(f"model_{model}_model_args_{model_args}") > 150: + model_name = f"model_{model}_model_args_{model_args}"[:100] + else: + model_name = f"model_{model}_model_args_{model_args}" + + lm.model_identifier = sanitize_model_name(model_name) + return lm