sematic-ai / sematic

An open-source ML pipeline development platform
Other
975 stars 59 forks source link

Allow custom resources for runner pods #1099

Closed augray closed 1 year ago

augray commented 1 year ago

Closes #1095

Until now, runner pods could only use fixed resource requirements. We had to pick a value that was big enough to not OOM in the vast majority of cases while also not being wasteful in what was requested. This led to a few limitations:

  1. Not all runner pods had equal compute needs (inline runs might require more or less memory, importing large libs might increase memory near the limit for some workloads, etc.)
  2. Anything requiring a secret could not be executed inline. Note that inline (aka non-standalone) stuff should STILL be only used for lightweight tasks, these do sometimes require secrets (ex: a func which makes just one quick API call)
  3. It wasn't possible to pursue cluster resource efficiency/reliability goals by putting runner pods on non-pre-emptible nodes or similar.

This PR adds the functionality to overcome these limitations.

Testing

In both cases I confirmed that custom compute (ex: cpu and mem) was used, as well as that secrets were properly mounted to the runner.