Skip to content

Commit 6bb7adb

Browse files
committed
rename files
1 parent 2c62cd9 commit 6bb7adb

21 files changed

+51
-229
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
python3 merge_alloc_discrete.py &
3+
python3 merge_frag_discrete.py &
4+
python3 merge_frag_ratio_discrete.py &
5+
python3 merge_fail_pods.py &

experiments/analysis/bash_merge.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

experiments/analysis/merge_alloc_discrete_0920.py renamed to experiments/analysis/merge_alloc_discrete.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
RESULTDIR="analysis_results"
66
DATADIR="data"
7-
RESULTDIR="analysis_results"
8-
DATADIR="data"
7+
98
filepath = os.path.abspath(__file__)
109
root = Path(filepath).parents[1] # 0524
1110
data = root / DATADIR
@@ -18,12 +17,12 @@
1817
# │ │ ├── analysis_new.csv
1918
# │ │ └── analysis.csv
2019
# │ ├── [d] images
21-
# │ ├── merge_0913.py
22-
# │ ├── plot_0810_dotprod_extend.py
20+
# │ ├── merge.py
21+
# │ ├── plot.py
2322
# ├── [d] data
24-
# │ ├── [d] cluster_hhpai_na61-pod_hhpai_na61-0820_no_time
25-
# │ │ ├── [d] 01-FragShare
26-
# │ │ │ ├── [d] 0.6
23+
# │ ├── [d] openb_pod_list_default
24+
# │ │ ├── [d] 06-FGD
25+
# │ │ │ ├── [d] 1.3
2726
# │ │ │ │ ├── [d] 42
2827
# ......
2928

experiments/analysis/merge_fail_pods_1010.py renamed to experiments/analysis/merge_fail_pods.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
import pandas as pd
33
from pathlib import Path
44

5-
DATADIR="data"
65
IN_FILE="analysis_fail.out"
7-
RESULTDIR="analysis_results"
86
OUT_CSV="analysis_fail.csv"
7+
RESULTDIR="analysis_results"
8+
DATADIR="data"
9+
910
filepath = os.path.abspath(__file__)
1011
root = Path(filepath).parents[1] # 0524
1112
data = root / DATADIR
@@ -18,14 +19,15 @@
1819
# │ │ ├── analysis_new.csv
1920
# │ │ └── analysis.csv
2021
# │ ├── [d] images
21-
# │ ├── merge_0913.py
22-
# │ ├── plot_0810_dotprod_extend.py
22+
# │ ├── merge.py
23+
# │ ├── plot.py
2324
# ├── [d] data
24-
# │ ├── [d] cluster_hhpai_na61-pod_hhpai_na61-0820_no_time
25-
# │ │ ├── [d] 01-FragShare
26-
# │ │ │ ├── [d] 0.6
25+
# │ ├── [d] openb_pod_list_default
26+
# │ │ ├── [d] 06-FGD
27+
# │ │ │ ├── [d] 1.3
2728
# │ │ │ │ ├── [d] 42
2829
# ......
30+
2931
def get_total_num_gpu(workload):
3032
return 6212
3133

experiments/analysis/merge_frag_discrete_0928.py renamed to experiments/analysis/merge_frag_discrete.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
# │ │ ├── analysis_new.csv
1818
# │ │ └── analysis.csv
1919
# │ ├── [d] images
20-
# │ ├── merge_0913.py
21-
# │ ├── plot_0810_dotprod_extend.py
20+
# │ ├── merge.py
21+
# │ ├── plot.py
2222
# ├── [d] data
23-
# │ ├── [d] cluster_hhpai_na61-pod_hhpai_na61-0820_no_time
24-
# │ │ ├── [d] 01-FragShare
25-
# │ │ │ ├── [d] 0.6
23+
# │ ├── [d] openb_pod_list_default
24+
# │ │ ├── [d] 06-FGD
25+
# │ │ │ ├── [d] 1.3
2626
# │ │ │ │ ├── [d] 42
2727
# ......
28+
2829
def get_total_num_gpu(workload):
2930
return 6212
3031

experiments/analysis/merge_frag_ratio_discrete_0928.py renamed to experiments/analysis/merge_frag_ratio_discrete.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
RESULTDIR="analysis_results"
66
DATADIR="data"
7+
78
filepath = os.path.abspath(__file__)
89
root = Path(filepath).parents[1] # 0524
910
data = root / DATADIR
@@ -16,12 +17,12 @@
1617
# │ │ ├── analysis_new.csv
1718
# │ │ └── analysis.csv
1819
# │ ├── [d] images
19-
# │ ├── merge_0913.py
20-
# │ ├── plot_0810_dotprod_extend.py
20+
# │ ├── merge.py
21+
# │ ├── plot.py
2122
# ├── [d] data
22-
# │ ├── [d] cluster_hhpai_na61-pod_hhpai_na61-0820_no_time
23-
# │ │ ├── [d] 01-FragShare
24-
# │ │ │ ├── [d] 0.6
23+
# │ ├── [d] openb_pod_list_default
24+
# │ │ ├── [d] 06-FGD
25+
# │ │ │ ├── [d] 1.3
2526
# │ │ │ │ ├── [d] 42
2627
# ......
2728

experiments/plot/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.csv
22
*.pdf
3+
!expected_results/*.pdf

experiments/plot/plot_paib_alloc.py renamed to experiments/plot/plot_openb_alloc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11

22
# %%
3-
# 1016
43
import matplotlib
54
import pandas as pd
65
import seaborn as sns
76
import matplotlib.pyplot as plt
87
from pathlib import Path
9-
from IPython.display import display
108
from utils import parse_workload_name, POLICY_ABBR_DICT
119

12-
PAPER_PLOT=True # False: Plot with thinner lines for DingTalk or Doc usages
10+
PAPER_PLOT=True # False: Plot with thinner lines for Presentation
1311
SAVEFIG=True # False: plt.show()
1412
TUNE_RATIO = 1.3
15-
FIGNAME = "paib_alloc.pdf"
13+
FIGNAME = "openb_alloc.pdf"
1614

1715
workload = 'openb_pod_list_default'
1816

experiments/plot/plot_paib_frag_amount.py renamed to experiments/plot/plot_openb_frag_amount.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11

22
# %%
3-
# 1016
43
import matplotlib
54
import pandas as pd
65
import seaborn as sns
76
import matplotlib.pyplot as plt
87
from pathlib import Path
9-
from IPython.display import display
108
from utils import parse_workload_name, POLICY_ABBR_DICT
119

1210
TYPE='frag_amount'
13-
PAPER_PLOT=True # False: Plot with thinner lines for DingTalk or Doc usages
11+
PAPER_PLOT=True # False: Plot with thinner lines for Presentation
1412
SAVEFIG=False # False: plt.show()
1513
TUNE_RATIO = 1.3
16-
FIGNAME = "paib_%s.pdf"
14+
FIGNAME = "openb_%s.pdf"
1715

1816
workload = 'openb_pod_list_default'
1917

@@ -42,10 +40,6 @@
4240

4341
dfn['workload'] = dfn.workload.apply(parse_workload_name)
4442

45-
workload_order = ['EightGpu80', 'EightGpu60', 'FourGpu80', 'FourGpu60', 'TwoGpu80', 'TwoGpu60', 'OneGpu80', 'OneGpu60', 'ShareGpu80', 'ShareGpu60', 'hhpai_0820','hhpai_0905','hhpai_mvap_0820', 'hhpai_mvap_0905', 'mit', 'mvap', 'paib']
46-
workload_order_dict = dict(zip(workload_order, range(1, len(workload_order)+1)))
47-
dfn.workload = dfn.workload.apply(lambda x: x if x not in workload_order_dict else "%02d-%s" % (workload_order_dict[x], x))
48-
4943
# display(dfn)
5044
# print("SC_POLICY_LIST=[%s]" % (",".join("'%s'" % x for x in list(dfn.sc_policy.unique()))))
5145

@@ -68,33 +62,9 @@
6862
dfnp.sc_policy = dfnp.sc_policy.apply(lambda x: POLICY_ABBR_DICT.get(x, x))
6963
dfp_dict[type] = dfnp
7064

71-
# openb, production workloads:
72-
73-
# openb, multi-GPUs workloads
74-
# workload = 'cluster_openb-pod_openb-0820_a20aoc_gpu_nospec'
75-
# workload = 'cluster_openb-pod_openb-0820_a30aoc_gpu_nospec'
76-
# workload = 'cluster_openb-pod_openb-0820_a40aoc_gpu_nospec'
77-
# workload = 'cluster_openb-pod_openb-0820_a50aoc_gpu_nospec'
78-
79-
# openb, non-GPU workloads
80-
# workload = 'cluster_openb-pod_openb-0820_nocpu_gpu_nospec'
81-
82-
# openb, heterogeneous GPU types
83-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_05'
84-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_10'
85-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_20'
86-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_25'
87-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec'
88-
89-
# mvap, GPU-sharing workloads
90-
# workload = 'cluster_mvap-pod_mvap-0820_nomem_no_time-cap_1.0'
91-
92-
# policy_keep = ['FGD', 'Clustering', 'Packing', 'DotProd', 'BestFit', 'Random']
9365
policy_keep = ['Random', 'DotProd', 'Clustering', 'Packing', 'BestFit', 'FGD']
9466
policy_keepr = ['FGD', 'BestFit', 'Packing', 'Clustering', 'DotProd', 'Random']
9567

96-
# TYPE=list(FILEDICT.keys())[1]
97-
# TYPE='frag_ratio'
9868
# ['alloc', 'frag_amount', 'frag_ratio']
9969
dfnp = dfp_dict[TYPE]
10070

experiments/plot/plot_paib_frag_ratio.py renamed to experiments/plot/plot_openb_frag_ratio.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11

22
# %%
3-
# 1016
43
import matplotlib
54
import pandas as pd
65
import seaborn as sns
76
import matplotlib.pyplot as plt
87
from pathlib import Path
9-
from IPython.display import display
108
from utils import parse_workload_name, POLICY_ABBR_DICT
119

1210
TYPE='frag_ratio'
13-
PAPER_PLOT=True # False: Plot with thinner lines for DingTalk or Doc usages
11+
PAPER_PLOT=True # False: Plot with thinner lines for Presentation
1412
SAVEFIG=False # False: plt.show()
1513
TUNE_RATIO = 1.3
16-
FIGNAME = "paib_%s.pdf"
14+
FIGNAME = "openb_%s.pdf"
1715

1816
workload = 'openb_pod_list_default'
1917

@@ -42,10 +40,6 @@
4240

4341
dfn['workload'] = dfn.workload.apply(parse_workload_name)
4442

45-
workload_order = ['EightGpu80', 'EightGpu60', 'FourGpu80', 'FourGpu60', 'TwoGpu80', 'TwoGpu60', 'OneGpu80', 'OneGpu60', 'ShareGpu80', 'ShareGpu60', 'hhpai_0820','hhpai_0905','hhpai_mvap_0820', 'hhpai_mvap_0905', 'mit', 'mvap', 'paib']
46-
workload_order_dict = dict(zip(workload_order, range(1, len(workload_order)+1)))
47-
dfn.workload = dfn.workload.apply(lambda x: x if x not in workload_order_dict else "%02d-%s" % (workload_order_dict[x], x))
48-
4943
# display(dfn)
5044
# print("SC_POLICY_LIST=[%s]" % (",".join("'%s'" % x for x in list(dfn.sc_policy.unique()))))
5145

@@ -68,33 +62,9 @@
6862
dfnp.sc_policy = dfnp.sc_policy.apply(lambda x: POLICY_ABBR_DICT.get(x, x))
6963
dfp_dict[type] = dfnp
7064

71-
# openb, production workloads:
72-
73-
# openb, multi-GPUs workloads
74-
# workload = 'cluster_openb-pod_openb-0820_a20aoc_gpu_nospec'
75-
# workload = 'cluster_openb-pod_openb-0820_a30aoc_gpu_nospec'
76-
# workload = 'cluster_openb-pod_openb-0820_a40aoc_gpu_nospec'
77-
# workload = 'cluster_openb-pod_openb-0820_a50aoc_gpu_nospec'
78-
79-
# openb, non-GPU workloads
80-
# workload = 'cluster_openb-pod_openb-0820_nocpu_gpu_nospec'
81-
82-
# openb, heterogeneous GPU types
83-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_05'
84-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_10'
85-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_20'
86-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec_25'
87-
# workload = 'cluster_openb-pod_openb-0820_gpu_gpuspec'
88-
89-
# mvap, GPU-sharing workloads
90-
# workload = 'cluster_mvap-pod_mvap-0820_nomem_no_time-cap_1.0'
91-
92-
# policy_keep = ['FGD', 'Clustering', 'Packing', 'DotProd', 'BestFit', 'Random']
9365
policy_keep = ['Random', 'DotProd', 'Clustering', 'Packing', 'BestFit', 'FGD']
9466
policy_keepr = ['FGD', 'BestFit', 'Packing', 'Clustering', 'DotProd', 'Random']
9567

96-
# TYPE=list(FILEDICT.keys())[1]
97-
# TYPE='frag_amount'
9868
# ['alloc', 'frag_amount', 'frag_ratio']
9969
dfnp = dfp_dict[TYPE]
10070

experiments/plot/plot_paib_gpushare_alloc_bar.py renamed to experiments/plot/plot_openb_gpushare_alloc_bar.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11

22
# %%
3-
# 1016
4-
from email import policy
5-
from ssl import ALERT_DESCRIPTION_HANDSHAKE_FAILURE
63
import matplotlib
7-
from matplotlib import style
8-
from matplotlib import hatch
94
import pandas as pd
105
import seaborn as sns
116
import matplotlib.pyplot as plt
127
from pathlib import Path
13-
from IPython.display import display
148
from utils import parse_workload_name, POLICY_ABBR_DICT
159

16-
PAPER_PLOT=False # False: Plot with thinner lines for DingTalk or Doc usages
10+
PAPER_PLOT=False # False: Plot with thinner lines for Presentation
1711
SAVEFIG=True # False: plt.show()
1812
TUNE_RATIO = 1.3
19-
FIGNAME = "paib_gpushare_alloc_bar.pdf"
13+
FIGNAME = "openb_gpushare_alloc_bar.pdf"
2014

2115
# openb, GPU-sharing workloads
2216
workloads = ['openb_pod_list_gpushare20',
@@ -73,28 +67,13 @@
7367
dfnp.sc_policy = dfnp.sc_policy.apply(lambda x: POLICY_ABBR_DICT.get(x, x))
7468
dfp_dict[type] = dfnp
7569

76-
77-
# policy_keep = ['FGD', 'Packing', 'Clustering', 'DotProd', 'BestFit', 'Random']
7870
policy_keep = ['FGD', 'BestFit', 'Packing', 'Clustering', 'DotProd', 'Random']
79-
# policy_keep = ['BestFit', 'FGD Coarse', 'FGD']
80-
8171

8272
# ['alloc', 'frag_amount', 'frag_ratio']
8373
dfnp = dfp_dict['alloc']
8474

8575
yhead = 30
8676
dfnpp = dfnp[dfnp.workload.isin(workloads)][dfnp.arrive_rate==100].copy()
87-
# print(dfnpp[dfnpp.workload == workloads[4]].groupby(by='sc_policy').mean())
88-
# print(dfnpp['sc_policy', ])
89-
# dfnpp.workload = dfnpp.workload.apply(lambda x:
90-
# {
91-
# 'cluster_openb-pod_openb-0820_cpu037_gpu_nospec': 'CPU037',
92-
# 'cluster_openb-pod_openb-0820_cpu050_gpu_nospec': 'CPU050',
93-
# 'cluster_openb-pod_openb-0820_cpu072_gpu_nospec': 'CPU072',
94-
# 'cluster_openb-pod_openb-0820_cpu100_gpu_nospec': 'CPU100',
95-
# 'cluster_openb-pod_openb-0820_cpu200_gpu_nospec': 'CPU200',
96-
# 'cluster_openb-pod_openb-0820_cpu235_gpu_nospec': 'CPU235',
97-
# }.get(x, x))
9877
dfnpp.workload = dfnpp.workload.apply(lambda x:
9978
{
10079
'openb_pod_list_gpushare20': '20%',
@@ -119,16 +98,12 @@
11998
# bars.bar_label(container, label_type='edge', fmt='%0.1f%%', padding=5)
12099
bars.bar_label(bars.containers[0], label_type='edge', fmt='%0.1f%%', padding=5)
121100

122-
plt.xlabel('Percentage of GPUs occupied by GPU-sharing workloads')
101+
plt.xlabel('Percentage of GPUs occupied by GPU-sharing workloads') # plt.xlabel('Arrived Workload (in Percentage of Cluster GPU Capacity)')
123102
plt.ylabel('Unallocated GPU (%)')
124103

125104
plt.legend()
126-
# plt.xlabel('Arrived Workload (in Percentage of Cluster GPU Capacity)')
127-
# plt.ylabel('Unallocated GPU (%)')
128-
# plt.xlim(100-yhead, None)
129105
plt.ylim(0, 21.7)
130106
# plt.title("%s" % (workload))
131-
# plt.show()
132107

133108
plt.grid(linestyle='-.', alpha=0.8, axis='y')
134109
plt.legend(ncol=3, loc='lower center')

0 commit comments

Comments
 (0)