Skip to content

Commit c43cfca

Browse files
terrytangyuanrasmith
authored andcommitted
[Bugfix] Fix incorrect types in LayerwiseProfileResults (vllm-project#12196)
Signed-off-by: Yuan Tang <[email protected]>
1 parent c4f2b7e commit c43cfca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vllm/profiler/layerwise_profile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import copy
22
from collections import defaultdict
33
from dataclasses import asdict, dataclass, field
4-
from typing import Callable, Dict, List, Optional, Tuple, TypeAlias, Union
4+
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeAlias, Union
55

66
import pandas as pd
77
from torch._C._autograd import DeviceType, _KinetoEvent, _ProfilerResult
@@ -128,7 +128,7 @@ def export_summary_stats_table_csv(self, filename: str):
128128
])
129129
df.to_csv(filename)
130130

131-
def convert_stats_to_dict(self) -> str:
131+
def convert_stats_to_dict(self) -> dict[str, Any]:
132132
return {
133133
"metadata": {
134134
"num_running_seqs": self.num_running_seqs
@@ -227,7 +227,7 @@ def _total_cuda_time(self):
227227
[self._cumulative_cuda_time(root) for root in self._module_tree])
228228

229229
def _build_stats_trees(self):
230-
summary_dict: Dict[str, self.StatsTreeNode] = {}
230+
summary_dict: Dict[str, _StatsTreeNode] = {}
231231
total_cuda_time = self._total_cuda_time()
232232

233233
def pct_cuda_time(cuda_time_us):

0 commit comments

Comments
 (0)