Skip to content

Commit

Permalink
[Platform] improve platforms getattr (vllm-project#12264)
Browse files Browse the repository at this point in the history
Signed-off-by: Mengqing Cao <cmq0113@163.com>
Signed-off-by: Isotr0py <2037008807@qq.com>
  • Loading branch information
MengqingCao authored and Isotr0py committed Feb 2, 2025
1 parent dd6169e commit 6c5fe14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vllm/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ def __getattr__(name: str):
global _init_trace
_init_trace = "".join(traceback.format_stack())
return _current_platform
else:
elif name in globals():
return globals()[name]
else:
raise AttributeError(
f"No attribute named '{name}' exists in {__name__}.")


__all__ = [
Expand Down

0 comments on commit 6c5fe14

Please sign in to comment.