We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44b5e41 commit c165bb8Copy full SHA for c165bb8
bigcode_eval/utils.py
@@ -308,6 +308,7 @@ def complete_code(
308
except ValueError as e:
309
# When the length of input_ids == max_length, the generation is the same as the input
310
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.")
312
generated_tokens = inputs
313
else:
314
raise e
0 commit comments