Repository navigation
Conversation
…reated on
cancel() sent a GET to /workloads/distributed/{id}/suspend for every job,
but run:ai only accepts POST for suspend, and single-node jobs are created
under /workloads/trainings. cancel() now posts to the same collection that
status() and create_training_job() use.
DGXCloudRayJob always creates a distributed workload, even on one node,
so its status, wait, stop and logs now pass workload_type="distributed"
instead of letting the executor infer trainings from nodes=1, which made
wait() poll a 404 forever.
Fixes NVIDIA-NeMo#704
Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
Author
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #704
what
DGXCloudExecutor.cancel()now sends aPOST(run:ai has noGETsuspend) to/workloads/{trainings|distributed}/{id}/suspend, picking the collection the same waycreate_training_job()andstatus()do. before, every cancel was aGETon the distributed endpoint, so single-node jobs (created under/workloads/trainings) could not be suspended at all.status(),cancel()andfetch_logs()take an optionalworkload_type; the default is unchanged (distributedwhennodes > 1, elsetrainings).DGXCloudRayJobalways creates a distributed workload, even withnodes=1, sostatus(),wait(),stop()andlogs()now passworkload_type="distributed". before, a single-node ray job was polled under/workloads/trainings, every poll got a 404 thatstatus()treats as transient, andwait()never returned.tests
test_cancelis parametrized overnodes=1andnodes=2and asserts aPOSTto the matching suspend url (it used to pin theGETon the distributed url); added tests for an explicitworkload_typeoncancel()andstatus().test/run/ray/test_dgxcloud.pychecks that a single-nodeDGXCloudRayJobpolls, waits on and suspends/workloads/distributed/{id}.pytest test/core/execution/test_dgxcloud.py test/run/ray/test_dgxcloud.py test/run/torchx_backend/schedulers/test_dgxcloud.py: 79 passed; the 7 new or changed tests fail on main.