Scheduler throws KeyError
Closed this issue · 0 comments
lucasavila00 commented
I have a convoluted configuration for limits.
The following line throws KeyError: https://github.com/insitro/redun/blob/main/redun/scheduler.py#L1319-L1323
Making the dict lookups use .get(x, 0)
fixes it for me.
def _add_limits(limits1, limits2):
return {
limit_name: limits1.get(limit_name, 0) + limits2.get(limit_name, 0)
for limit_name in set(limits1) | set(limits2)
}
I could not isolate this to a minimal reproduction case, as this was dependent on timing of tasks.