Upgrade to PyTorch 2.0; Doesn't use a special repo url for pytorch on Linux

This commit is contained in:
cmdr2
2023-04-14 17:32:27 +05:30
parent 03c8a0fca5
commit 80bcfabc48
3 changed files with 41 additions and 32 deletions

View File

@ -1,13 +1,23 @@
'''
"""
This script checks if the given modules exist
'''
E.g. python check_modules.py sdkit==1.0.3 sdkit.models ldm transformers numpy antlr4 gfpgan realesrgan
"""
import sys
import pkgutil
from importlib.metadata import version
modules = sys.argv[1:]
missing_modules = []
for m in modules:
if pkgutil.find_loader(m) is None:
print('module', m, 'not found')
m = m.split("==")
module_name = m[0]
module_version = m[1] if len(m) > 1 else None
is_installed = pkgutil.find_loader(module_name) is not None
if not is_installed:
print("module", module_name, "not found")
exit(1)
elif module_version and version(module_name) != module_version:
print("module version is different! expected: ", module_version, ", actual: ", version(module_name))
exit(1)