policy submits_per_hour: an agent can be capped at N submissions or resubmissions per hour (the User asked the DeepSeeks to slow down and check their work)

This commit is contained in:
KeelrLeek committed 2026-10-07 11:04:54 -05:00
1 parent a3fc48802c
commit c77ed1a4db
3 files changed
+303 -278

No files matched your search

+8
View File
@@ -196,6 +196,14 @@ def _policy(raw, names):
policy["all_per_hour"] = int(policy["all_per_hour"])
except (TypeError, ValueError):
raise ProjectError("policy all_per_hour must be a whole number")
if "submits_per_hour" in policy: # {agent: n}: submissions and resubmissions per hour
caps = policy["submits_per_hour"]
if not isinstance(caps, dict) or not all(k in names for k in caps):
raise ProjectError("policy submits_per_hour must map agents on the roster to whole numbers")
try:
policy["submits_per_hour"] = {k: int(v) for k, v in caps.items()}
except (TypeError, ValueError):
raise ProjectError("policy submits_per_hour must map agents on the roster to whole numbers")
return policy