Muyi 0.0.0__py3-none-any.whl → 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Muyi-0.0.0.dist-info → Muyi-0.0.1.dist-info}/METADATA +3 -3
- Muyi-0.0.1.dist-info/RECORD +9 -0
- muyi/gpu.py +20 -0
- muyi/utils.py +0 -21
- Muyi-0.0.0.dist-info/RECORD +0 -8
- {Muyi-0.0.0.dist-info → Muyi-0.0.1.dist-info}/LICENSE +0 -0
- {Muyi-0.0.0.dist-info → Muyi-0.0.1.dist-info}/WHEEL +0 -0
- {Muyi-0.0.0.dist-info → Muyi-0.0.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Muyi
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.1
|
|
4
4
|
Summary: Some useful utils.
|
|
5
5
|
Author: muyiiiii
|
|
6
6
|
Author-email:
|
|
@@ -11,6 +11,6 @@ Requires-Python: >=3
|
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# muyi_utils
|
|
15
15
|
|
|
16
|
-
Some useful utils for GNNs.
|
|
16
|
+
Some useful utils for GNNs and Deep Learning.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
muyi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
muyi/gpu.py,sha256=JLr-hQ84gv7afgFX6XHaquvN-HB19NqvwHxoq-rugdM,676
|
|
3
|
+
muyi/graph.py,sha256=4okLvgp0TboSpuKtlzXTTbLin2K-RMVxhqJ7CZt6Tps,1145
|
|
4
|
+
muyi/utils.py,sha256=WC71JmaDYw3wioP5vlCnQphNkQoE336b4X5rH3EVbEQ,540
|
|
5
|
+
Muyi-0.0.1.dist-info/LICENSE,sha256=GzHS9pi6vw_oGwKIGxAPch8iuVrHazOilEsYL7AlPK0,1085
|
|
6
|
+
Muyi-0.0.1.dist-info/METADATA,sha256=934n3ICwZiX_3XYhRvP9YaCG46H49Y_I9bIKQ3VhMFg,414
|
|
7
|
+
Muyi-0.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
8
|
+
Muyi-0.0.1.dist-info/top_level.txt,sha256=3X0xmx0SvmCNEj1ISqmD2evKh_ejCJQaLA4GEbGfKc4,5
|
|
9
|
+
Muyi-0.0.1.dist-info/RECORD,,
|
muyi/gpu.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import GPUtil
|
|
2
|
+
|
|
3
|
+
def get_gpu_memory_usage():
|
|
4
|
+
# 获取GPU使用情况
|
|
5
|
+
gpus = GPUtil.getGPUs()
|
|
6
|
+
gpu_memory_info = []
|
|
7
|
+
for gpu in gpus:
|
|
8
|
+
gpu_memory_info.append((gpu.id, gpu.name, f"{gpu.memoryUsed} MB", f"{gpu.memoryTotal} MB", f"{gpu.memoryUtil * 100:.1f}%"))
|
|
9
|
+
|
|
10
|
+
return gpu_memory_info
|
|
11
|
+
|
|
12
|
+
def display_gpu_memory_usage():
|
|
13
|
+
gpu_memory_info = get_gpu_memory_usage()
|
|
14
|
+
|
|
15
|
+
if gpu_memory_info:
|
|
16
|
+
print("GPU Memory Usage:")
|
|
17
|
+
for info in gpu_memory_info:
|
|
18
|
+
print(f"GPU ID: {info[0]}, Name: {info[1]}, Memory Used: {info[2]}, Total Memory: {info[3]}, Memory Utilization: {info[4]}")
|
|
19
|
+
else:
|
|
20
|
+
print("No GPU found.")
|
muyi/utils.py
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import matplotlib.pyplot as plt
|
|
3
3
|
|
|
4
|
-
import GPUtil
|
|
5
|
-
|
|
6
|
-
def get_gpu_memory_usage():
|
|
7
|
-
# 获取GPU使用情况
|
|
8
|
-
gpus = GPUtil.getGPUs()
|
|
9
|
-
gpu_memory_info = []
|
|
10
|
-
for gpu in gpus:
|
|
11
|
-
gpu_memory_info.append((gpu.id, gpu.name, f"{gpu.memoryUsed} MB", f"{gpu.memoryTotal} MB", f"{gpu.memoryUtil * 100:.1f}%"))
|
|
12
|
-
|
|
13
|
-
return gpu_memory_info
|
|
14
|
-
|
|
15
|
-
def display_gpu_memory_usage():
|
|
16
|
-
gpu_memory_info = get_gpu_memory_usage()
|
|
17
|
-
|
|
18
|
-
if gpu_memory_info:
|
|
19
|
-
print("GPU Memory Usage:")
|
|
20
|
-
for info in gpu_memory_info:
|
|
21
|
-
print(f"GPU ID: {info[0]}, Name: {info[1]}, Memory Used: {info[2]}, Total Memory: {info[3]}, Memory Utilization: {info[4]}")
|
|
22
|
-
else:
|
|
23
|
-
print("No GPU found.")
|
|
24
|
-
|
|
25
4
|
def color_print(content):
|
|
26
5
|
print(f'\033[1;46m{content}\033[0m\n')
|
|
27
6
|
|
Muyi-0.0.0.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
muyi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
muyi/graph.py,sha256=4okLvgp0TboSpuKtlzXTTbLin2K-RMVxhqJ7CZt6Tps,1145
|
|
3
|
-
muyi/utils.py,sha256=VuuZ0S4CieON-bNHmKqrinTEvmIdfUQF0gXhiapkUnM,1220
|
|
4
|
-
Muyi-0.0.0.dist-info/LICENSE,sha256=GzHS9pi6vw_oGwKIGxAPch8iuVrHazOilEsYL7AlPK0,1085
|
|
5
|
-
Muyi-0.0.0.dist-info/METADATA,sha256=FGffGdElQ4CcBWlVtWz-eu4cnOboef_YGz2ZJhodRhE,400
|
|
6
|
-
Muyi-0.0.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
7
|
-
Muyi-0.0.0.dist-info/top_level.txt,sha256=3X0xmx0SvmCNEj1ISqmD2evKh_ejCJQaLA4GEbGfKc4,5
|
|
8
|
-
Muyi-0.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|