Skip to content

Commit cc9033c

Browse files
meher-mloubnabnl
andauthored
Update warning message
Update warning message for value error when len input==max_len Co-authored-by: Loubna Ben Allal <[email protected]>
1 parent c165bb8 commit cc9033c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bigcode_eval/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def complete_code(
308308
except ValueError as e:
309309
# When the length of input_ids == max_length, the generation is the same as the input
310310
if str(e).startswith(f"Input length of input_ids is {inputs.shape[1]}, but `max_length` is set to {gen_kwargs['max_length']}"):
311-
warnings.warn(f"An error with the following message was thrown: {e}. Returning the input as the generation.")
311+
warnings.warn(f"An error with the following message was thrown: {e}. Returning the input as the generation, for higher scores consider using a larger `max_length`")
312312
generated_tokens = inputs
313313
else:
314314
raise e

0 commit comments

Comments
 (0)