-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Describe the problem
Currently, job attachments are cached within a session and there's one session per job. If two tasks run on a worker and use the same job attachments, the attachments will only be downloaded once. If two different jobs use the same job attachments though, the job attachments must be downloaded twice. The downloads could be reused to optimize run times.
Proposed Solution
Make a job attachments cache on the worker that's associated with a queue instead of a session so that as long as jobs belong to the same queue and are within the same permissions boundary, they benefit from job attachment caching.
Example Use Cases
Submitting multiple jobs that use the same job attachment inputs. For the use case I have in mind, we're submitting jobs with large gen AI models that change rarely and are reused between jobs.