[Misc]: clean up non-core lint issues (#37049)
Signed-off-by: whyiug <whyiug@hotmail.com>
This commit is contained in:
@@ -546,10 +546,7 @@ def main():
|
|||||||
args.prefill_backends = yaml_config.get("prefill_backends", None)
|
args.prefill_backends = yaml_config.get("prefill_backends", None)
|
||||||
|
|
||||||
# Check for special modes
|
# Check for special modes
|
||||||
if "mode" in yaml_config:
|
args.mode = yaml_config.get("mode", None)
|
||||||
args.mode = yaml_config["mode"]
|
|
||||||
else:
|
|
||||||
args.mode = None
|
|
||||||
|
|
||||||
# Batch specs and sizes
|
# Batch specs and sizes
|
||||||
# Support both explicit batch_specs and generated batch_spec_ranges
|
# Support both explicit batch_specs and generated batch_spec_ranges
|
||||||
@@ -572,10 +569,7 @@ def main():
|
|||||||
elif "batch_specs" in yaml_config:
|
elif "batch_specs" in yaml_config:
|
||||||
args.batch_specs = yaml_config["batch_specs"]
|
args.batch_specs = yaml_config["batch_specs"]
|
||||||
|
|
||||||
if "batch_sizes" in yaml_config:
|
args.batch_sizes = yaml_config.get("batch_sizes", None)
|
||||||
args.batch_sizes = yaml_config["batch_sizes"]
|
|
||||||
else:
|
|
||||||
args.batch_sizes = None
|
|
||||||
|
|
||||||
# Model config
|
# Model config
|
||||||
if "model" in yaml_config:
|
if "model" in yaml_config:
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class MarkdownFormatter(HelpFormatter):
|
|||||||
heading_md = f"{self._argument_heading_prefix} {option_strings}\n\n"
|
heading_md = f"{self._argument_heading_prefix} {option_strings}\n\n"
|
||||||
self._markdown_output.append(heading_md)
|
self._markdown_output.append(heading_md)
|
||||||
|
|
||||||
if action.choices or isinstance(action.metavar, (list, tuple)):
|
if action.choices or isinstance(action.metavar, list | tuple):
|
||||||
choices_iterable = action.choices or action.metavar
|
choices_iterable = action.choices or action.metavar
|
||||||
choices = f"`{'`, `'.join(str(c) for c in choices_iterable)}`"
|
choices = f"`{'`, `'.join(str(c) for c in choices_iterable)}`"
|
||||||
self._markdown_output.append(f": Possible choices: {choices}\n\n")
|
self._markdown_output.append(f": Possible choices: {choices}\n\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user