joonmyung 1.5.22__tar.gz → 1.6.0__tar.gz
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.
- {joonmyung-1.5.22 → joonmyung-1.6.0}/PKG-INFO +1 -1
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/draw.py +5 -5
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/script.py +24 -13
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung.egg-info/PKG-INFO +1 -1
- {joonmyung-1.5.22 → joonmyung-1.6.0}/setup.py +1 -1
- {joonmyung-1.5.22 → joonmyung-1.6.0}/LICENSE.txt +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/README.md +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/analysis.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/analysis_bak.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/analysis_/343/205/240/343/205/217.py" +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/dataset.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/evaluate.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/hook.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/model.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/utils.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/app.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/clip/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/clip/clip.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/clip/model.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/clip/simple_tokenizer.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/compression/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/compression/apply.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/compression/compression.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/data.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/dummy.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/file.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/gradcam.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/log.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/meta_data/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/meta_data/label.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/meta_data/utils.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/metric.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/model/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/model/compression.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/model.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/models/__init__.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/models/tome.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/status.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/utils.py +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung.egg-info/SOURCES.txt +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung.egg-info/dependency_links.txt +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung.egg-info/not-zip-safe +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung.egg-info/top_level.txt +0 -0
- {joonmyung-1.5.22 → joonmyung-1.6.0}/setup.cfg +0 -0
|
@@ -27,7 +27,7 @@ def drawHeatmap(matrixes, col=1, title=[], fmt=1, p=False,
|
|
|
27
27
|
linecolor=None, linewidths=0.1, fontsize=30, r=[1,1],
|
|
28
28
|
cmap="Greys", cbar=True, border=False,
|
|
29
29
|
output_dir='./result', save_name=None, show=True,
|
|
30
|
-
vis_x= False, vis_y = False):
|
|
30
|
+
vis_x= False, vis_y = False, tqdm_disable=True):
|
|
31
31
|
row = (len(matrixes) - 1) // col + 1
|
|
32
32
|
annot = True if fmt > 0 else False
|
|
33
33
|
if p:
|
|
@@ -59,7 +59,7 @@ def drawHeatmap(matrixes, col=1, title=[], fmt=1, p=False,
|
|
|
59
59
|
fig.set_size_inches(col * 8 * r[1], row * 8 * r[0])
|
|
60
60
|
# fig.set_size_inches(8, 8)
|
|
61
61
|
fig.patch.set_facecolor('white')
|
|
62
|
-
for e, matrix in enumerate(tqdm(matrixes)):
|
|
62
|
+
for e, matrix in enumerate(tqdm(matrixes, desc="drawHeatmap", disable=tqdm_disable)):
|
|
63
63
|
if type(matrix) == torch.Tensor:
|
|
64
64
|
matrix = matrix.detach().cpu().numpy()
|
|
65
65
|
ax = axes[e // col][e % col]
|
|
@@ -89,7 +89,7 @@ def drawHeatmap(matrixes, col=1, title=[], fmt=1, p=False,
|
|
|
89
89
|
plt.show()
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
def drawLinePlot(datas, index, col=1, title=[], xlabels=None, ylabels=None, markers=False, columns=None, p=False):
|
|
92
|
+
def drawLinePlot(datas, index, col=1, title=[], xlabels=None, ylabels=None, markers=False, columns=None, p=False, ):
|
|
93
93
|
row = (len(datas) - 1) // col + 1
|
|
94
94
|
title = title + list(range(len(title), len(datas) - len(title)))
|
|
95
95
|
fig, axes = plt.subplots(nrows=row, ncols=col, squeeze=False)
|
|
@@ -131,7 +131,7 @@ def drawLinePlot(datas, index, col=1, title=[], xlabels=None, ylabels=None, mark
|
|
|
131
131
|
plt.tight_layout()
|
|
132
132
|
plt.show()
|
|
133
133
|
|
|
134
|
-
def drawBarChart(df, x, y, splitColName, col=1, title=[], fmt=1, p=False, c=False, c_sites={}, showfliers=True):
|
|
134
|
+
def drawBarChart(df, x, y, splitColName, col=1, title=[], fmt=1, p=False, c=False, c_sites={}, showfliers=True, tqdm_disable=True):
|
|
135
135
|
d2s = df[splitColName].unique()
|
|
136
136
|
d1 = df['d1'].unique()[0]
|
|
137
137
|
d2s = [d2 for d2 in d2s for c_site in c_sites[d1].keys() if c_site in d2]
|
|
@@ -140,7 +140,7 @@ def drawBarChart(df, x, y, splitColName, col=1, title=[], fmt=1, p=False, c=Fals
|
|
|
140
140
|
|
|
141
141
|
fig, axes = plt.subplots(nrows=row, ncols=col, squeeze=False)
|
|
142
142
|
fig.set_size_inches(col * 12, row * 12)
|
|
143
|
-
for e, d2 in enumerate(tqdm(d2s)):
|
|
143
|
+
for e, d2 in enumerate(tqdm(d2s, desc="drawBarChart", disable=tqdm_disable)):
|
|
144
144
|
plt.title(d2, fontsize=20)
|
|
145
145
|
ax = axes[e // col][e % col]
|
|
146
146
|
temp = df.loc[df['d2'].isin([d2])]
|
|
@@ -60,6 +60,7 @@ class GPU_Worker():
|
|
|
60
60
|
if len(availGPUs) < self.need_gpu:
|
|
61
61
|
if self.p:
|
|
62
62
|
print(f"{count} | AVAIL/NEED/RUNNING GPUS : {list(availGPUs)}/{self.need_gpu}/{list(self.runGPUs.keys())}")
|
|
63
|
+
# print(f"{count} | DONE/REMAIN GPUS : ")
|
|
63
64
|
time.sleep(self.waitTime)
|
|
64
65
|
else:
|
|
65
66
|
break
|
|
@@ -88,16 +89,20 @@ class GPU_Worker():
|
|
|
88
89
|
self.runGPUs[int(gpu)] = p
|
|
89
90
|
|
|
90
91
|
def waitForEnd(self):
|
|
92
|
+
time.sleep(self.waitTimeInit)
|
|
93
|
+
|
|
91
94
|
count = 0
|
|
92
|
-
while
|
|
95
|
+
while True:
|
|
96
|
+
self.check_process()
|
|
93
97
|
if self.p:
|
|
94
98
|
count += 1
|
|
95
99
|
print(f"{count} | CURRENT RUNNING GPUS : {list(self.runGPUs.keys())}")
|
|
96
100
|
time.sleep(self.waitTime)
|
|
101
|
+
if not len(self.runGPUs):
|
|
102
|
+
break
|
|
97
103
|
return
|
|
98
104
|
|
|
99
|
-
def message(self, text):
|
|
100
|
-
url = "https://hooks.slack.com/services/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"
|
|
105
|
+
def message(self, text, url):
|
|
101
106
|
payload = {"text": text}
|
|
102
107
|
headers = {'Content-type': 'application/json'}
|
|
103
108
|
|
|
@@ -105,17 +110,22 @@ class GPU_Worker():
|
|
|
105
110
|
|
|
106
111
|
return response
|
|
107
112
|
|
|
108
|
-
def Process_Worker(processes, gpuWorker,
|
|
109
|
-
# TODO : 실험이 완전히 끝난 시간 체크할 필요가 존재함
|
|
113
|
+
def Process_Worker(processes, gpuWorker, s = 0, url = None, server = None):
|
|
110
114
|
start = time.localtime()
|
|
111
115
|
print("------ Start Running!! : {} ------".format(time2str(start)))
|
|
116
|
+
if url:
|
|
117
|
+
gpuWorker.message(f"Experiments Start \n"
|
|
118
|
+
f"Server {server} \n",
|
|
119
|
+
url = url)
|
|
112
120
|
|
|
113
121
|
for i, process in enumerate(tqdm(processes)):
|
|
122
|
+
if type(process) == list:
|
|
123
|
+
process = " && ".join(process)
|
|
114
124
|
gpus = gpuWorker.getGPU()
|
|
115
|
-
prefix = f"CUDA_VISIBLE_DEVICES={gpus} nohup
|
|
116
|
-
suffix = f"
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
prefix = f"CUDA_VISIBLE_DEVICES={gpus} nohup bash -c '"
|
|
126
|
+
suffix = f"' > {s+i+1}:gpu{gpus}.log 2>&1 "
|
|
127
|
+
|
|
128
|
+
print(f"{i + 1}/{len(processes)} : GPU{gpus} {prefix + process + suffix}")
|
|
119
129
|
session = subprocess.Popen(prefix + process + suffix, shell=True)
|
|
120
130
|
gpuWorker.register_process(gpus, session)
|
|
121
131
|
gpuWorker.waitForEnd()
|
|
@@ -124,10 +134,11 @@ def Process_Worker(processes, gpuWorker, m = None, p = False):
|
|
|
124
134
|
print("------ End Running!! : {} ------".format(time2str(end)))
|
|
125
135
|
training_time = datetime.timedelta(seconds=time.mktime(end) - time.mktime(start))
|
|
126
136
|
print(f"Time 1/all : {training_time}/{training_time / len(processes)} ------")
|
|
127
|
-
if
|
|
128
|
-
gpuWorker.message(f"Experiments Finished
|
|
129
|
-
f"
|
|
130
|
-
)
|
|
137
|
+
if url:
|
|
138
|
+
gpuWorker.message(f"Experiments Finished \n"
|
|
139
|
+
f"Server {server} \n"
|
|
140
|
+
f"Time 1/all : {training_time / len(processes)} / {training_time}",
|
|
141
|
+
url = url)
|
|
131
142
|
|
|
132
143
|
|
|
133
144
|
if __name__ == '__main__':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{joonmyung-1.5.22 → joonmyung-1.6.0}/joonmyung/analysis/analysis_/343/205/240/343/205/217.py"
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|