-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@parallel on Kubernetes] support for Jobsets
Implementation originates from [#1744] This commit adds support for @parallel when flows are run `--with kubernetes` Support for Argo workflows will follow in a separate commit. A user can run a flow with the following: @step def start(self): self.next(self.parallel_step, num_parallel=3) @kubernetes(cpu=1, memory=512) @parallel @step def parallel_step(self): ... Testing Done: - Ran a flow with @parallel on Kubernetes. Verified that it works correctly - Ran a flow without @parallel on Kubernetes. Verified that it works as expected. - Verified that jobsets based @parallel step gets scaled down if user kills it with a Ctrl-C Changes to original Implementation: - pass down ports of Jobsets - Ensured that `ubf_context` is set correctly - Ensured that `split-index` is set correctly based on the type of task (control vs worker) - Fix bug in incorrect RANK setting. In the earlier implementation, we were setting `parallelism` to created `replicatedJobs`. - In this implementation, we create a different copy of the job for each replicated worker. - So retrieving the rank based on the Kubernetes V1EnvVar.valueFrom (metadata.annotations['batch.kubernetes.io/job-completion-index']) wont work. - since `job-completion-index` relies on setting `parallelism` on the `job_spec`. Instead now we just statically set the `RANK` based on the index in the iterator defining the jobs.
- Loading branch information
Showing
6 changed files
with
612 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.