dep_check.py now ignores GPUtil

This commit is contained in:
josc146 2024-03-11 18:55:37 +08:00
parent 91eb72e515
commit dd89041f72
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,6 @@ import lm_dataformat
import ftfy import ftfy
import tqdm import tqdm
import tiktoken import tiktoken
import GPUtil
import torch import torch
import rwkv import rwkv

View File

@ -127,9 +127,12 @@ def update_config(body: ModelConfigBody):
@router.get("/status", tags=["Configs"]) @router.get("/status", tags=["Configs"])
def status(): def status():
import GPUtil try:
import GPUtil
gpus = GPUtil.getGPUs() gpus = GPUtil.getGPUs()
except:
gpus = []
if len(gpus) == 0: if len(gpus) == 0:
device_name = "CPU" device_name = "CPU"
else: else: