insitro / redun

Yet another redundant workflow engine
https://insitro.github.io/redun/
Apache License 2.0
510 stars 43 forks source link

Scheduler throws KeyError #91

Closed lucasavila00 closed 6 months ago

lucasavila00 commented 6 months ago

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.