diff --git a/flexeval/core/chat_dataset/template_based.py b/flexeval/core/chat_dataset/template_based.py index fa5d8189..00d81117 100644 --- a/flexeval/core/chat_dataset/template_based.py +++ b/flexeval/core/chat_dataset/template_based.py @@ -17,7 +17,7 @@ def load_jinja2_template(template: str | PathLike[str]) -> Template: path = Path(template) - if path.exists(): + if len(str(path)) <= 255 and path.exists(): return JINJA2_ENV.from_string(path.read_text(encoding="utf-8")) return JINJA2_ENV.from_string(template)