dep_check.py now ignores GPUtil
This commit is contained in:
parent
91eb72e515
commit
dd89041f72
@ -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
|
||||||
|
@ -127,9 +127,12 @@ def update_config(body: ModelConfigBody):
|
|||||||
|
|
||||||
@router.get("/status", tags=["Configs"])
|
@router.get("/status", tags=["Configs"])
|
||||||
def status():
|
def status():
|
||||||
|
try:
|
||||||
import GPUtil
|
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user