Skip to content

Commit

Permalink
[Platform] improve platforms getattr (#12264)
Browse files Browse the repository at this point in the history
Signed-off-by: Mengqing Cao <[email protected]>
  • Loading branch information
MengqingCao authored Jan 21, 2025
1 parent 9a7c3a0 commit c646128
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 c646128

Please sign in to comment.