Convert formatting to use ruff instead of yapf + isort (#26247)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-05 07:06:22 -07:00
committed by GitHub
parent 17edd8a807
commit d6953beb91
1508 changed files with 115205 additions and 94107 deletions
+8 -4
View File
@@ -20,6 +20,7 @@ def start_monitoring_torch_compile(vllm_config: VllmConfig):
path = vllm_config.compile_debug_dump_path()
if compilation_config.level == CompilationLevel.PIECEWISE and path:
import depyf
path.mkdir(parents=True, exist_ok=True)
global context_manager
context_manager = depyf.prepare_debug(path.as_posix())
@@ -29,8 +30,9 @@ def start_monitoring_torch_compile(vllm_config: VllmConfig):
def end_monitoring_torch_compile(vllm_config: VllmConfig):
compilation_config: CompilationConfig = vllm_config.compilation_config
if compilation_config.level == CompilationLevel.PIECEWISE:
logger.info("torch.compile takes %.2f s in total",
compilation_config.compilation_time)
logger.info(
"torch.compile takes %.2f s in total", compilation_config.compilation_time
)
global context_manager
if context_manager is not None:
context_manager.__exit__(None, None, None)
@@ -46,8 +48,10 @@ def validate_cudagraph_capturing_enabled():
# if an illegal cudagraph capturing happens, raise an error.
global cudagraph_capturing_enabled
if not cudagraph_capturing_enabled:
raise RuntimeError("CUDA graph capturing detected at an inappropriate "
"time. This operation is currently disabled.")
raise RuntimeError(
"CUDA graph capturing detected at an inappropriate "
"time. This operation is currently disabled."
)
def set_cudagraph_capturing_enabled(enabled: bool):