Unverified Commit 184a4df6 authored by penguin_wwy's avatar penguin_wwy Committed by GitHub
Browse files

Replace function call with set literal (#11867)

parent f7b1d8c5
......@@ -638,43 +638,27 @@ class TokenizerCommunicatorMixin:
if self.log_requests:
if self.log_requests_level == 0:
max_length = 1 << 30
skip_names = set(
[
"text",
"input_ids",
"input_embeds",
"image_data",
"audio_data",
"lora_path",
"sampling_params",
]
)
out_skip_names = set(
[
"text",
"output_ids",
"embedding",
]
)
skip_names = {
"text",
"input_ids",
"input_embeds",
"image_data",
"audio_data",
"lora_path",
"sampling_params",
}
out_skip_names = {"text", "output_ids", "embedding"}
elif self.log_requests_level == 1:
max_length = 1 << 30
skip_names = set(
[
"text",
"input_ids",
"input_embeds",
"image_data",
"audio_data",
"lora_path",
]
)
out_skip_names = set(
[
"text",
"output_ids",
"embedding",
]
)
skip_names = {
"text",
"input_ids",
"input_embeds",
"image_data",
"audio_data",
"lora_path",
}
out_skip_names = {"text", "output_ids", "embedding"}
elif self.log_requests_level == 2:
max_length = 2048
elif self.log_requests_level == 3:
......
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