Add bulk job data updates to avoid repeated s3 calls#1569
Conversation
|
Paragon Review Skipped Hi @deep1401! Your Polarity credit balance is insufficient to complete this review. Please visit https://home.polarity.cc to add more credits and continue using Paragon reviews. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
lab-sdk/src/lab/job.py
Outdated
| await self.update_job_data_field("tensorboard_output_dir", tensorboard_dir) | ||
|
|
||
| async def update_job_data_field(self, key: str, value): | ||
| async def update_job_data_field(self, key, value=None, multiple: bool = False): |
There was a problem hiding this comment.
This works well, and it is good that it maintains backwards compatibility. but I think this function signature is a little confusing.
One idea might be: Make a new function called like update_job_data_fields that just takes a dict. Have this function just handle singles and create a dict and call the new function.
Or if that's overkill then stick with this but make it super clear that both keys and values are stored in a parameter called key.
There was a problem hiding this comment.
Okay I took both of your suggestions, everything goes through update_job_data_fields and I fixed what key means also
Fixes #1467