in dynalab_cli/utils.py [0:0]
def get_task_submission_limit(task_code):
hr_diff = 24
threshold = 3
r = requests.get(f"{DYNABENCH_API}/tasks/submitable")
r.raise_for_status()
for task in r.json():
if task["task_code"] == task_code:
if task["dynalab_hr_diff"] is not None:
hr_diff = task["dynalab_hr_diff"]
if task["dynalab_threshold"] is not None:
threshold = task['dynalab_threshold']
return hr_diff, threshold
return hr_diff, threshold