MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / __init__

Method __init__

GPU-Virtual-Service/gpu-remoting/scheduler/node.py:32–47  ·  view source on GitHub ↗
(self, id, ip)

Source from the content-addressed store, hash-verified

30
31class Node:
32 def __init__(self, id, ip):
33 self.id = id
34 self.ip = ip
35 self.job_run_list = []
36 self.job_run_list_lock = threading.Lock()
37 self.gpu_list = []
38
39 r = redis_connection()
40 config = get_config_file()
41 self.gpu_num = config['ServerConfig']['serverGPU_']
42 for i in range(self.gpu_num):
43 redis_key = f"{self.ip}:{i}"
44 gpu_info_pro = r.hgetall(redis_key)
45 gpu = GPU_info(gpu_info_pro)
46 self.gpu_list.append(gpu)
47 print(gpu)
48
49
50 def update_gpu_info(self, gpu_id, job, type):#type=0:分配内存,type=1:释放内存

Callers

nothing calls this directly

Calls 4

redis_connectionFunction · 0.85
get_config_fileFunction · 0.85
GPU_infoClass · 0.85
LockMethod · 0.80

Tested by

no test coverage detected