Skip to content

[Bugfix] Fix incorrect types in LayerwiseProfileResults #12196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vllm/profiler/layerwise_profile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
from collections import defaultdict
from dataclasses import asdict, dataclass, field
from typing import Callable, Dict, List, Optional, Tuple, TypeAlias, Union
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeAlias, Union

import pandas as pd
from torch._C._autograd import DeviceType, _KinetoEvent, _ProfilerResult
Expand Down Expand Up @@ -128,7 +128,7 @@ def export_summary_stats_table_csv(self, filename: str):
])
df.to_csv(filename)

def convert_stats_to_dict(self) -> str:
def convert_stats_to_dict(self) -> dict[str, Any]:
return {
"metadata": {
"num_running_seqs": self.num_running_seqs
Expand Down Expand Up @@ -227,7 +227,7 @@ def _total_cuda_time(self):
[self._cumulative_cuda_time(root) for root in self._module_tree])

def _build_stats_trees(self):
summary_dict: Dict[str, self.StatsTreeNode] = {}
summary_dict: Dict[str, _StatsTreeNode] = {}
total_cuda_time = self._total_cuda_time()

def pct_cuda_time(cuda_time_us):
Expand Down
Loading