Skip to content

Commit

Permalink
[Bugfix] Fix incorrect types in LayerwiseProfileResults (#12196)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Tang <[email protected]>
  • Loading branch information
terrytangyuan authored Jan 20, 2025
1 parent d264312 commit 0974c9b
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 0974c9b

Please sign in to comment.