diff --git a/vllm/profiler/visualize_layerwise_profile.py b/vllm/profiler/visualize_layerwise_profile.py index ea27152670d36..880d3f760d6b2 100644 --- a/vllm/profiler/visualize_layerwise_profile.py +++ b/vllm/profiler/visualize_layerwise_profile.py @@ -1,8 +1,8 @@ -import os import argparse import copy import json import math +import os from pathlib import Path from typing import Any, List, Optional, Tuple @@ -427,7 +427,7 @@ def make_plot_title_suffix(profile_json: dict) -> str: output_directory = args.output_directory if args.output_directory else Path( args.json_trace).parent - + if not os.path.exists(output_directory): os.makedirs(output_directory)