Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengjieLi28 committed Aug 3, 2023
1 parent b05cdd9 commit c318f91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/xoscar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
to_binary,
to_str,
)
from .nvutils import cuda_count

# Please refer to https://bugs.python.org/issue41451
try:
Expand Down Expand Up @@ -239,6 +238,8 @@ def lazy_import(
rename: str | None = None,
placeholder: bool = False,
):
from .nvutils import cuda_count

rename = rename or name
prefix_name = name.split(".", 1)[0]
globals = globals or inspect.currentframe().f_back.f_globals # type: ignore
Expand Down

0 comments on commit c318f91

Please sign in to comment.