@@ -126,7 +126,10 @@ def custom_benchmark(self) -> str:
126126
127127 @custom_benchmark .setter
128128 def custom_benchmark (self , value : str ):
129- if not value : raise ValueError ("Custom benchmark file cannot be empty, has to be a path to file" )
129+ if not value : #raise ValueError("Custom benchmark file cannot be empty, has to be a path to file")
130+ self .config_state ['custom_benchmark' ] = value
131+ self .save ()
132+ return
130133 if not os .path .exists (value ): raise ValueError ("Custom benchmark file does not exist" )
131134 if not os .path .isfile (value ): raise ValueError ("Custom benchmark file is not a file" )
132135 if not os .access (value , os .R_OK ): raise ValueError ("Custom benchmark file is not readable" )
@@ -208,7 +211,7 @@ def parse_cmdline_args():
208211 parser .add_argument ('--attack-model' , type = str , default = None , help = "Attack model" )
209212 parser .add_argument ('--target-provider' , type = str , default = None , help = "Target provider" )
210213 parser .add_argument ('--target-model' , type = str , default = None , help = "Target model" )
211- parser .add_argument ('--custom-benchmark' , type = str , default = None , help = "Custom benchmark file" )
214+ parser .add_argument ('--custom-benchmark' , type = str , default = '' , help = "Custom benchmark file" )
212215 parser .add_argument ('--tests' , type = str , default = '' , help = "Custom test configuration (LIST)" )
213216 parser .add_argument ('-n' , '--num-attempts' , type = int , default = None , help = "Number of different attack prompts" )
214217 parser .add_argument ('-t' , '--num-threads' , type = int , default = None , help = "Number of worker threads" )
0 commit comments