From 9e97fe8a577ef5b8b7bdabbea92843bfed8e1700 Mon Sep 17 00:00:00 2001 From: Benjamin Bossan Date: Fri, 17 Nov 2023 13:37:37 +0100 Subject: [PATCH] Same issue as previous commit with enum reprs --- src/peft/tuners/prompt_tuning/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/peft/tuners/prompt_tuning/config.py b/src/peft/tuners/prompt_tuning/config.py index 46df189673..9f15b1a881 100644 --- a/src/peft/tuners/prompt_tuning/config.py +++ b/src/peft/tuners/prompt_tuning/config.py @@ -73,4 +73,6 @@ def __post_init__(self): self.peft_type = PeftType.PROMPT_TUNING if self.tokenizer_kwargs and (self.prompt_tuning_init != PromptTuningInit.TEXT): - raise ValueError(f"tokenizer_kwargs only valid when using prompt_tuning_init='{PromptTuningInit.TEXT}'.") + raise ValueError( + f"tokenizer_kwargs only valid when using prompt_tuning_init='{PromptTuningInit.TEXT.value}'." + )