[Misc] Clean up unnecessary E501 ignore (#26274)

Signed-off-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
Roger Wang
2025-10-06 07:29:18 +00:00
committed by GitHub
parent 7c2ec0fe87
commit 43c146ca42
8 changed files with 38 additions and 38 deletions
+2 -2
View File
@@ -626,7 +626,7 @@ class RandomDataset(BenchmarkDataset):
# Decode, then re-encode and truncate to preserve token count invariants
total_input_len = prefix_len + int(input_len)
prompt, adjusted_token_sequence, token_mismatch = (
gen_prompt_decode_to_target_len( # noqa: E501
gen_prompt_decode_to_target_len(
tokenizer=tokenizer,
token_sequence=token_sequence,
target_token_len=total_input_len,
@@ -2855,7 +2855,7 @@ class PrefixRepetitionRandomDataset(BenchmarkDataset):
for _ in range(prompts_per_prefix):
suffix_tokens, token_mistmatch = _generate_exact_length_tokens(
suffix_len
) # noqa: E501
)
token_mismatch_total += token_mistmatch
combined_tokens = prefix_tokens + suffix_tokens
prompt = tokenizer.decode(combined_tokens)
+2 -2
View File
@@ -459,14 +459,14 @@ def validate_args(args):
):
assert args.backend == "vllm-chat", (
f"{args.dataset_path} needs to use vllm-chat as the backend."
) # noqa: E501
)
elif args.dataset_path in (
InstructCoderDataset.SUPPORTED_DATASET_PATHS
| AIMODataset.SUPPORTED_DATASET_PATHS
):
assert args.backend == "vllm", (
f"{args.dataset_path} needs to use vllm as the backend."
) # noqa: E501
)
else:
raise ValueError(f"{args.dataset_path} is not supported by hf dataset.")