File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 16
16
fetch-depth : 0
17
17
- name : Secret Scanning
18
18
uses : trufflesecurity/trufflehog@main
19
+ with :
20
+ extra_args : --only-verified
Original file line number Diff line number Diff line change 34
34
35
35
36
36
app = typer .Typer ()
37
+ app = typer .Typer (pretty_exceptions_show_locals = False )
37
38
38
39
logging_config = dict ( # noqa C408
39
40
version = 1 ,
Original file line number Diff line number Diff line change @@ -269,6 +269,11 @@ def greedy_until(
269
269
f"{ context_size + max_new_tokens = } which is greather than { self .max_length = } . Truncating context to { self .max_length - max_new_tokens } tokens."
270
270
)
271
271
context_size = self .max_length - max_new_tokens
272
+ if context_size < 0 :
273
+ logger .critical (
274
+ f"{ context_size = } is less than 0, either reduce the max_new_tokens or increase model max length."
275
+ )
276
+ raise ValueError ("Context size is less than 0." )
272
277
inputs = [input [- context_size :] for input in inputs ]
273
278
else :
274
279
if context_size > self .max_length :
You can’t perform that action at this time.
0 commit comments