diff --git a/backend-python/dep_check.py b/backend-python/dep_check.py index 9abf783..b451d1c 100644 --- a/backend-python/dep_check.py +++ b/backend-python/dep_check.py @@ -7,7 +7,6 @@ import lm_dataformat import ftfy import tqdm import tiktoken -import GPUtil import torch import rwkv diff --git a/backend-python/routes/config.py b/backend-python/routes/config.py index aa0ab1f..b71d30c 100644 --- a/backend-python/routes/config.py +++ b/backend-python/routes/config.py @@ -127,9 +127,12 @@ def update_config(body: ModelConfigBody): @router.get("/status", tags=["Configs"]) def status(): - import GPUtil + try: + import GPUtil - gpus = GPUtil.getGPUs() + gpus = GPUtil.getGPUs() + except: + gpus = [] if len(gpus) == 0: device_name = "CPU" else: