Skip to content

Commit

Permalink
fix preci (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: n1ck-guo <[email protected]>
  • Loading branch information
n1ck-guo authored Sep 12, 2024
1 parent d8ee1c0 commit 200fcdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auto_round/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,14 +833,14 @@ def get_library_version(library_name):
if python_vesion < Version("3.8"):
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
import pkg_resources
import pkg_resources # pylint: disable=E0401
try:
version = pkg_resources.get_distribution(library_name).version
return version
except pkg_resources.DistributionNotFound:
return f"{library_name} is not installed"
else:
import importlib_metadata
import importlib_metadata # pylint: disable=E0401
try:
version = importlib_metadata.version(library_name)
return version
Expand Down

0 comments on commit 200fcdd

Please sign in to comment.