mohsenfayyaz commited on
Commit
caa572d
·
0 Parent(s):

Reset history

Browse files
Files changed (5) hide show
  1. .gitattributes +35 -0
  2. README.md +12 -0
  3. app.py +89 -0
  4. gpus.csv +45 -0
  5. requirements.txt +2 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: PLUS Lab GPUs
3
+ emoji: ➕
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 5.13.1
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ import datetime
4
+ import plotly.express as px
5
+
6
+ def split_multi_users(dfs):
7
+ df = dfs.copy()
8
+ df["usernames"] = df["username"].apply(lambda x: x.split(", "))
9
+ df["count"] = 1
10
+ new_df = []
11
+ for row in df.to_dict(orient="records"):
12
+ gpu_users_num = len(row["usernames"])
13
+ for username in row["usernames"]:
14
+ new_row = row.copy()
15
+ new_row["count"] = 1 / gpu_users_num
16
+ new_row["username"] = username
17
+ new_df.append(new_row)
18
+ df = pd.DataFrame(new_df)
19
+ return df
20
+
21
+ def plot_now():
22
+ # dfs = pd.read_csv("hf://spaces/pluslab/PLUS_Lab_GPUs/gpus.csv")
23
+ dfs = pd.read_csv("hf://datasets/pluslab/PLUS_Lab_GPUs_Data/gpus.csv")
24
+ dfs = dfs.drop(columns=["Unnamed: 0"])
25
+ dfs = dfs.fillna("FREE")
26
+ dfs_plot = split_multi_users(dfs)
27
+ fig = px.bar(
28
+ dfs_plot, x="count", y="server", color="username",
29
+ title=f"Last Updated {min(dfs['timestamp'])}",
30
+ color_discrete_map={
31
+ "FREE": "black",
32
+ },
33
+ text=dfs_plot['username'].astype(str) + "<br>" + dfs_plot['device'].astype(str),
34
+ )
35
+ fig.update_layout(
36
+ yaxis={'categoryorder': 'array', 'categoryarray': dfs_plot["server"].unique()[::-1]},
37
+ barcornerradius=50,
38
+ )
39
+ fig.update_traces(textposition='inside', insidetextanchor='middle')
40
+ print(dfs_plot)
41
+ return fig, dfs
42
+
43
+ def plot_history(sample=True, sampling_interval_minutes=180):
44
+ dfh = pd.read_pickle("hf://spaces/pluslab/PLUS_Lab_GPUs/history.pkl.gz", )
45
+ dfh = dfh.fillna("FREE")
46
+ dfh = split_multi_users(dfh)
47
+ dfh = dfh[["polling_timestamp", "username", "count"]]
48
+ dfh = dfh.groupby(["polling_timestamp", "username"]).sum()
49
+ dfh = dfh.reset_index()
50
+ dfh = dfh.sort_values(by=["polling_timestamp", "count"], ascending=False)
51
+ if sample:
52
+ unique_timestamps = dfh["polling_timestamp"].unique()
53
+ sampled_timestamps = [unique_timestamps[0]]
54
+ for i, t in enumerate(unique_timestamps[1:]):
55
+ diff = sampled_timestamps[-1] - t
56
+ if diff > datetime.timedelta(minutes=sampling_interval_minutes):
57
+ sampled_timestamps.append(t)
58
+ dfh = dfh[dfh["polling_timestamp"].isin(sampled_timestamps)]
59
+ fig = px.area(dfh, x="polling_timestamp", y="count", color='username', color_discrete_map={"FREE": "black",}, markers=True, line_shape='spline',)
60
+ return fig, dfh
61
+
62
+
63
+ def plot_figs():
64
+ fig_now, dfn = plot_now()
65
+ try:
66
+ fig_history, dfh = plot_history()
67
+ except Exception as e:
68
+ print(e)
69
+ fig_history = None
70
+ dfh = None
71
+ return fig_now, dfn, fig_history
72
+
73
+ demo = gr.Interface(
74
+ fn=plot_figs,
75
+ inputs = [
76
+
77
+ ],
78
+ outputs = [
79
+ gr.Plot(label="GPU Status", elem_classes="plotcss"),
80
+ gr.Dataframe(label="GPU Status Details"),
81
+ gr.Plot(label="History", elem_classes="plotcss"),
82
+ ],
83
+ live=True,
84
+ flagging_options=[],
85
+ css=".plotcss {max-width: 820px !important;}"
86
+ )
87
+
88
+ if __name__ == "__main__":
89
+ demo.launch(debug=False)
gpus.csv ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,timestamp,server,name,device,utilization.gpu [%],utilization.memory [%],temperature.gpu,power.draw [W],username
2
+ 0,2025/08/24 20:54:26.539,pluslab-a100.cs.ucla.edu,NVIDIA A100-SXM4-40GB,0,0 %,0 %,29,52.28 W,
3
+ 1,2025/08/24 20:54:26.561,pluslab-a100.cs.ucla.edu,NVIDIA A100-SXM4-40GB,1,0 %,0 %,30,52.50 W,
4
+ 2,2025/08/24 20:54:26.580,pluslab-a100.cs.ucla.edu,NVIDIA A100-SXM4-40GB,2,0 %,0 %,27,52.61 W,
5
+ 3,2025/08/24 20:54:26.596,pluslab-a100.cs.ucla.edu,NVIDIA A100-SXM4-40GB,3,0 %,0 %,28,53.10 W,
6
+ 0,2025/08/24 20:54:27.724,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,0,0 %,0 %,44,47.17 W,
7
+ 1,2025/08/24 20:54:27.734,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,1,99 %,51 %,75,305.19 W,junyizhang
8
+ 2,2025/08/24 20:54:27.742,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,2,0 %,0 %,43,44.71 W,
9
+ 3,2025/08/24 20:54:27.750,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,3,99 %,54 %,73,274.60 W,junyizhang
10
+ 4,2025/08/24 20:54:27.767,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,4,69 %,22 %,57,146.07 W,junyizhang
11
+ 5,2025/08/24 20:54:27.774,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,5,100 %,0 %,46,73.39 W,junyizhang
12
+ 6,2025/08/24 20:54:27.779,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,6,0 %,0 %,44,46.31 W,
13
+ 7,2025/08/24 20:54:27.790,pluslab01-a100.cs.ucla.edu,NVIDIA A100 80GB PCIe,7,0 %,0 %,41,43.86 W,
14
+ 0,2025/08/24 20:54:28.899,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,0,79 %,64 %,86,457.36 W,ponienkung
15
+ 1,2025/08/24 20:54:28.918,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,1,78 %,64 %,83,503.67 W,ponienkung
16
+ 2,2025/08/24 20:54:28.933,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,2,80 %,66 %,86,476.30 W,ponienkung
17
+ 3,2025/08/24 20:54:28.948,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,3,79 %,66 %,84,483.46 W,ponienkung
18
+ 4,2025/08/24 20:54:28.963,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,4,100 %,0 %,77,164.29 W,haikang
19
+ 5,2025/08/24 20:54:28.977,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,5,100 %,0 %,72,158.19 W,haikang
20
+ 6,2025/08/24 20:54:28.992,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,6,0 %,0 %,81,216.23 W,haikang
21
+ 7,2025/08/24 20:54:29.006,pluslab01-h100.cs.ucla.edu,NVIDIA H100 80GB HBM3,7,100 %,0 %,69,155.87 W,haikang
22
+ 0,2025/08/24 20:54:30.416,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,0,0 %,0 %,40,28.65 W,
23
+ 1,2025/08/24 20:54:30.421,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,1,0 %,0 %,36,33.35 W,
24
+ 2,2025/08/24 20:54:30.425,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,2,0 %,0 %,39,33.23 W,elvindu
25
+ 3,2025/08/24 20:54:30.429,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,3,0 %,0 %,35,29.11 W,
26
+ 4,2025/08/24 20:54:30.433,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,4,0 %,0 %,32,22.01 W,
27
+ 5,2025/08/24 20:54:30.438,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,5,0 %,0 %,31,28.91 W,
28
+ 6,2025/08/24 20:54:30.442,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,6,0 %,0 %,32,27.85 W,
29
+ 7,2025/08/24 20:54:30.445,pluslab-a6000.cs.ucla.edu,NVIDIA RTX A6000,7,0 %,0 %,29,22.26 W,
30
+ 0,2025/08/24 20:54:31.579,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,0,0 %,0 %,28,22.30 W,
31
+ 1,2025/08/24 20:54:31.591,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,1,0 %,0 %,27,18.46 W,
32
+ 2,2025/08/24 20:54:31.603,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,2,0 %,0 %,27,15.99 W,
33
+ 3,2025/08/24 20:54:31.617,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,3,0 %,0 %,28,23.15 W,
34
+ 4,2025/08/24 20:54:31.628,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,4,0 %,0 %,27,21.75 W,
35
+ 5,2025/08/24 20:54:31.643,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,5,0 %,0 %,26,19.21 W,
36
+ 6,2025/08/24 20:54:31.656,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,6,0 %,0 %,27,20.50 W,
37
+ 7,2025/08/24 20:54:31.665,pluslab01-a6000.cs.ucla.edu,NVIDIA RTX A6000,7,0 %,0 %,26,26.94 W,
38
+ 0,2025/08/24 20:54:34.185,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,0,0 %,0 %,28,26.18 W,cfyang
39
+ 1,2025/08/24 20:54:34.223,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,1,0 %,0 %,26,30.27 W,cfyang
40
+ 2,2025/08/24 20:54:34.250,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,2,85 %,72 %,68,201.33 W,hzhang19
41
+ 3,2025/08/24 20:54:34.279,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,3,1 %,0 %,62,127.91 W,hzhang19
42
+ 4,2025/08/24 20:54:34.298,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,4,75 %,63 %,70,203.11 W,hzhang19
43
+ 5,2025/08/24 20:54:34.319,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,5,52 %,26 %,56,133.41 W,hzhang19
44
+ 6,2025/08/24 20:54:34.360,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,6,100 %,83 %,69,215.74 W,hzhang19
45
+ 7,2025/08/24 20:54:34.393,pluslab02-a6000.cs.ucla.edu,NVIDIA RTX A6000,7,85 %,72 %,64,187.19 W,hzhang19
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ plotly==5.24.1
2
+ pandas==2.2.3