Spaces:
Sleeping
Sleeping
inoki-giskard
commited on
Commit
·
34009a0
1
Parent(s):
71788ef
Add time in log
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import datasets
|
|
3 |
import huggingface_hub
|
4 |
import sys
|
5 |
import os
|
|
|
6 |
from pathlib import Path
|
7 |
|
8 |
|
@@ -107,6 +108,10 @@ def try_submit(model_id, dataset_id, dataset_config, dataset_split, local):
|
|
107 |
"dataset_config": config,
|
108 |
}
|
109 |
|
|
|
|
|
|
|
|
|
110 |
report = runner.run(**runner_kwargs)
|
111 |
|
112 |
# TODO: Publish it with given repo id/model id
|
@@ -122,6 +127,8 @@ def try_submit(model_id, dataset_id, dataset_config, dataset_split, local):
|
|
122 |
with open(output_dir / "report.html", "w") as f:
|
123 |
print(f'Writing to {output_dir / "report.html"}')
|
124 |
f.write(rendered_report)
|
|
|
|
|
125 |
|
126 |
return config, split
|
127 |
|
|
|
3 |
import huggingface_hub
|
4 |
import sys
|
5 |
import os
|
6 |
+
import time
|
7 |
from pathlib import Path
|
8 |
|
9 |
|
|
|
108 |
"dataset_config": config,
|
109 |
}
|
110 |
|
111 |
+
eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
|
112 |
+
start = time.time()
|
113 |
+
print(f"Start local evaluation on {eval_str}")
|
114 |
+
|
115 |
report = runner.run(**runner_kwargs)
|
116 |
|
117 |
# TODO: Publish it with given repo id/model id
|
|
|
127 |
with open(output_dir / "report.html", "w") as f:
|
128 |
print(f'Writing to {output_dir / "report.html"}')
|
129 |
f.write(rendered_report)
|
130 |
+
|
131 |
+
print(f"Finished local evaluation on {eval_str}: {time.time() - start:.2f}s")
|
132 |
|
133 |
return config, split
|
134 |
|