Skip to content

Commit 681dfa1

Browse files
committed
Fix: Resolve plots directory path inconsistency in GenAI-perf
When using model names with special characters (e.g., paths with slashes), GenAI-perf creates sanitized artifact directory names but the plots generation fails due to path mismatches between profile() and create_plots() methods. - Fixed create_plots() to use the same PerfAnalyzerConfig path logic as profile() - Ensured plots directory is created under the correct sanitized artifact directory - Added proper path resolution for profile_export_file in plots configuration This resolves the "No such file or directory: 'artifacts/plots/config.yaml'" error fundamentally.
1 parent e7c174a commit 681dfa1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

genai-perf/genai_perf/subcommand/profile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ def profile(self) -> None:
9090

9191
def create_plots(self) -> None:
9292
# TMA-1911: support plots CLI option
93-
plot_dir = self._config.output.artifact_directory / "plots"
93+
# Create the same config objects as in profile() to get consistent paths
94+
objectives = self._create_objectives_based_on_stimulus()
95+
perf_analyzer_config = self._create_perf_analyzer_config(objectives)
96+
plot_dir = perf_analyzer_config.get_artifact_directory() / "plots"
9497
PlotConfigParser.create_init_yaml_config(
95-
filenames=[self._config.output.profile_export_file], # single run
98+
filenames=[perf_analyzer_config.get_profile_export_file()],
9699
output_dir=plot_dir,
97100
)
98101
config_parser = PlotConfigParser(plot_dir / "config.yaml")

0 commit comments

Comments
 (0)