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