"proto/vscode:/vscode.git/clone" did not exist on "e415b690a68d7a0e149c996e46def41c867ff421"
Unverified Commit 1c03af33 authored by Sungjae Lee's avatar Sungjae Lee Committed by GitHub
Browse files

fix: type error while checking context length (#2972)

parent 2f03271d
...@@ -486,7 +486,7 @@ class VLLM(TemplateLM): ...@@ -486,7 +486,7 @@ class VLLM(TemplateLM):
inputs = [] inputs = []
ctxlens = [] ctxlens = []
for cache_key, context_enc, continuation_enc in chunk: for cache_key, context_enc, continuation_enc in chunk:
if full_length := (context_enc + continuation_enc) >= self.max_length: if full_length := len(context_enc + continuation_enc) >= self.max_length:
eval_logger.warning( eval_logger.warning(
f"Context length {full_length} exceeds max length ({self.max_length}). Truncating context." f"Context length {full_length} exceeds max length ({self.max_length}). Truncating context."
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment