Spaces:
Sleeping
Sleeping
Update finetune.py
Browse files- finetune.py +12 -0
finetune.py
CHANGED
@@ -201,6 +201,12 @@ def finetune_model(lang, task, tempdir_path, log_every, max_epoch, scheduler, wa
|
|
201 |
log(tempdir_path, "exp/finetune/images")
|
202 |
log(tempdir_path, "exp/finetune/config.yaml")
|
203 |
log(tempdir_path, "exp/finetune/valid.acc.ave.pth")
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
finetune_zip = zipfile.ZipFile(f"{tempdir_path}/finetune.zip", "w", zipfile.ZIP_DEFLATED)
|
206 |
finetune_zip.write(f"{tempdir_path}/exp/stats")
|
@@ -208,6 +214,12 @@ def finetune_model(lang, task, tempdir_path, log_every, max_epoch, scheduler, wa
|
|
208 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/images")
|
209 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/config.yaml")
|
210 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/valid.acc.ave.pth")
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
finetune_zip.close()
|
212 |
|
213 |
gr.Info("Finished generating result file in zip!")
|
|
|
201 |
log(tempdir_path, "exp/finetune/images")
|
202 |
log(tempdir_path, "exp/finetune/config.yaml")
|
203 |
log(tempdir_path, "exp/finetune/valid.acc.ave.pth")
|
204 |
+
log(tempdir_path, "output.log")
|
205 |
+
log(tempdir_path, "acc.png")
|
206 |
+
log(tempdir_path, "loss.png")
|
207 |
+
log(tempdir_path, "base.txt")
|
208 |
+
log(tempdir_path, "hyp.txt")
|
209 |
+
log(tempdir_path, "ref.txt")
|
210 |
|
211 |
finetune_zip = zipfile.ZipFile(f"{tempdir_path}/finetune.zip", "w", zipfile.ZIP_DEFLATED)
|
212 |
finetune_zip.write(f"{tempdir_path}/exp/stats")
|
|
|
214 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/images")
|
215 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/config.yaml")
|
216 |
finetune_zip.write(f"{tempdir_path}/exp/finetune/valid.acc.ave.pth")
|
217 |
+
finetune_zip.write(f"{tempdir_path}/output.log")
|
218 |
+
finetune_zip.write(f"{tempdir_path}/acc.png")
|
219 |
+
finetune_zip.write(f"{tempdir_path}/loss.png")
|
220 |
+
finetune_zip.write(f"{tempdir_path}/base.txt")
|
221 |
+
finetune_zip.write(f"{tempdir_path}/hyp.txt")
|
222 |
+
finetune_zip.write(f"{tempdir_path}/ref.txt")
|
223 |
finetune_zip.close()
|
224 |
|
225 |
gr.Info("Finished generating result file in zip!")
|