Skip to content

fix(dgxcloud): suspend and poll workloads on the endpoint they were created on - #705

Open
dundysm wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
dundysm:dgxcloud-workload-endpoints
Open

dundysm wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
dundysm:dgxcloud-workload-endpoints

Conversation

@dundysm

@dundysm dundysm commented Nov 22, 2026

Copy link
Copy Markdown

fixes #704

what

  • DGXCloudExecutor.cancel() now sends a POST (run:ai has no GET suspend) to /workloads/{trainings|distributed}/{id}/suspend, picking the collection the same way create_training_job() and status() do. before, every cancel was a GET on the distributed endpoint, so single-node jobs (created under /workloads/trainings) could not be suspended at all.
  • status(), cancel() and fetch_logs() take an optional workload_type; the default is unchanged (distributed when nodes > 1, else trainings).
  • DGXCloudRayJob always creates a distributed workload, even with nodes=1, so status(), wait(), stop() and logs() now pass workload_type="distributed". before, a single-node ray job was polled under /workloads/trainings, every poll got a 404 that status() treats as transient, and wait() never returned.

tests

  • test_cancel is parametrized over nodes=1 and nodes=2 and asserts a POST to the matching suspend url (it used to pin the GET on the distributed url); added tests for an explicit workload_type on cancel() and status().
  • new test/run/ray/test_dgxcloud.py checks that a single-node DGXCloudRayJob polls, 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.

…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>
@copy-pr-bot

copy-pr-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@dundysm

dundysm commented Nov 22, 2026

Copy link
Copy Markdown
Author

@ko3n1g could you take a look when you get a chance? small fix for dgxcloud cancel (post on the right suspend endpoint) and for single-node ray jobs on dgxcloud being polled under /workloads/trainings; repro and tests are in #704 and the pr body.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dgxcloud: cancel() uses GET on the distributed suspend endpoint, and single-node ray jobs are polled under /workloads/trainings

1 participant