CK-Explorer commited on
Commit
a1c1035
·
1 Parent(s): f8849a8

feat: remove the RAM status printing

Browse files

Using psutil.virtual_memory() reports the total RAM of the machine, but not the space's RAM.

Files changed (1) hide show
  1. ui/utils.py +0 -16
ui/utils.py CHANGED
@@ -42,20 +42,4 @@ def create_model_pools(name_list: list[str]) -> dict[str, SentenceTransformer]:
42
  model_pool: dict[str, SentenceTransformer] = {}
43
  for name in name_list:
44
  model_pool[name] = SentenceTransformer(name)
45
- _print_RAM_status()
46
  return model_pool
47
-
48
- def _print_RAM_status() -> None:
49
- """
50
- Print the current status of system RAM.
51
- """
52
- mem = psutil.virtual_memory()
53
- gib = 1024 ** 3
54
- print(
55
- (
56
- "[Info] System RAM: "
57
- f"Available {mem.available/gib:.2f} GB, "
58
- f"{mem.used / gib:.2f} / {mem.total / gib:.2f} GB ({mem.percent}%)"
59
- )
60
- )
61
-
 
42
  model_pool: dict[str, SentenceTransformer] = {}
43
  for name in name_list:
44
  model_pool[name] = SentenceTransformer(name)
 
45
  return model_pool