queue file
Browse files- app.py +1 -1
- src/submission/submit.py +20 -0
app.py
CHANGED
|
@@ -199,6 +199,6 @@ with demo:
|
|
| 199 |
)
|
| 200 |
|
| 201 |
scheduler = BackgroundScheduler()
|
| 202 |
-
scheduler.add_job(restart_space, "interval", seconds=
|
| 203 |
scheduler.start()
|
| 204 |
demo.queue(default_concurrency_limit=40).launch()
|
|
|
|
| 199 |
)
|
| 200 |
|
| 201 |
scheduler = BackgroundScheduler()
|
| 202 |
+
scheduler.add_job(restart_space, "interval", seconds=900)
|
| 203 |
scheduler.start()
|
| 204 |
demo.queue(default_concurrency_limit=40).launch()
|
src/submission/submit.py
CHANGED
|
@@ -62,6 +62,9 @@ def add_new_eval(
|
|
| 62 |
|
| 63 |
model_size = get_model_size(model_info=model_info, precision=precision)
|
| 64 |
|
|
|
|
|
|
|
|
|
|
| 65 |
# Were the model card and license filled?
|
| 66 |
try:
|
| 67 |
license = model_info.cardData["license"]
|
|
@@ -111,6 +114,23 @@ def add_new_eval(
|
|
| 111 |
commit_message=f"Add {model} to eval queue",
|
| 112 |
)
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
# Remove the local file
|
| 115 |
os.remove(out_path)
|
| 116 |
|
|
|
|
| 62 |
|
| 63 |
model_size = get_model_size(model_info=model_info, precision=precision)
|
| 64 |
|
| 65 |
+
if model_size>30:
|
| 66 |
+
return styled_error("Due to limited GPU availability, evaluations for models larger than 30B are currently not automated. Please open a ticket here so we do it manually for you. https://huggingface.co/spaces/silma-ai/Arabic-Broad-Leaderboard/discussions")
|
| 67 |
+
|
| 68 |
# Were the model card and license filled?
|
| 69 |
try:
|
| 70 |
license = model_info.cardData["license"]
|
|
|
|
| 114 |
commit_message=f"Add {model} to eval queue",
|
| 115 |
)
|
| 116 |
|
| 117 |
+
##update queue file
|
| 118 |
+
queue_file = f"./eval_queue.json"
|
| 119 |
+
#append the new entry to the queue file
|
| 120 |
+
queue_entries = []
|
| 121 |
+
if os.path.exists(queue_file):
|
| 122 |
+
with open(queue_file, "r") as f:
|
| 123 |
+
queue_entries = json.load(f)
|
| 124 |
+
queue_entries.append(eval_entry)
|
| 125 |
+
else:
|
| 126 |
+
queue_entries.append(eval_entry)
|
| 127 |
+
with open(queue_file, "w") as f:
|
| 128 |
+
json.dump(queue_entries, f, indent=4)
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
# Remove the local file
|
| 135 |
os.remove(out_path)
|
| 136 |
|