dgxcloud: cancel() uses GET on the distributed suspend endpoint, and single-node ray jobs are polled under /workloads/trainings
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- ai-infra-agents, api
调研方向
Start in nemo_run/core/execution/dgxcloud.py, comparing cancel() with status(), which already chooses trainings or distributed from nodes. Then check DGXCloudRayJob in nemo_run/run/ray/dgxcloud.py, where start() creates a distributed workload that the polling and cancel paths may read from trainings. Done means both paths use the collection the workload was created in, and a mocked-HTTP test confirms it. A fix is already open as PR #705, so check that before starting.
由索引模型根据 Issue 内容生成。
描述
describe the bug
DGXCloudExecutor talks to the run:ai workloads api on the wrong endpoint in two places:
cancel()sends aGETto/workloads/distributed/{id}/suspendfor every job. run:ai only exposes suspend as aPOST(POST /api/v1/workloads/trainings/{workloadId}/suspendandPOST /api/v1/workloads/distributed/{workloadId}/suspend), andcreate_training_job()submits single-node jobs to/workloads/trainings, so cancelling a single-node job hits an endpoint that does not know the workload.status()already pickstrainingsvsdistributedfromnodes;cancel()does not.DGXCloudRayJob.start()always creates a/workloads/distributedworkload, even withnodes=1, butstatus(),wait(),stop()andlogs()go throughexecutor.status()/executor.cancel(), which infertrainingsfor a single node.status()treats the resulting non-200 as transient and returnsNone, sowait()never sees a terminal phase and polls forever, andstop()cannot suspend the job.
steps to reproduce (cpu only, mocked http)
from unittest.mock import MagicMock, patch
from nemo_run.core.execution.dgxcloud import DGXCloudExecutor
from nemo_run.run.ray.dgxcloud import DGXCloudRayJob
ex = DGXCloudExecutor(
base_url="https://dgx.example.com/api/v1", kube_apiserver_url="https://k8s",
client_id="a", client_secret="b", project_name="p",
container_image="img", pvc_nemo_run_dir="/workspace/nemo_run", nodes=1,
)
with patch.object(DGXCloudExecutor, "get_auth_token", return_value="t"), \
patch("requests.get", return_value=MagicMock(status_code=404)) as get:
ex.cancel("job123")
print(get.call_args.args[0])
# GET .../workloads/distributed/job123/suspend (job was created under /workloads/trainings)
DGXCloudRayJob(name="r", executor=ex, workload_id="wl1").status(display=False)
print(get.call_args.args[0])
# .../workloads/trainings/wl1, but the ray job was created under /workloads/distributed
expected behavior
cancel() posts to the suspend endpoint of the collection the workload was created in, and the ray job polls, streams and cancels its workload under /workloads/distributed regardless of node count.
i have a small fix with tests ready and will open a pr.
- 主要语言
- Python
- 星标
- 268
- 派生
- 121
- 平均合并
- 3 小时 42 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA-NeMo/Run 的其他 Issue
-
community-request
难度 2/5 1-3 小时 新手友好度 78/100
NVIDIA-NeMo/Run#727 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 25/100
NVIDIA-NeMo/Run#678 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 38/100
NVIDIA-NeMo/Run#665 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 55/100
NVIDIA-NeMo/Run#659 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 20/100
NVIDIA-NeMo/Run#594 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"可能已有人在做 @cestercian 今天认领。 未关闭comp/cli P2 type/bug
难度 2/5 1-3 小时 新手友好度 75/100
NousResearch/hermes-agent#162259 · 1 条评论 ·
维护者通常 1 天内回复
-
upstream update
难度 2/5 1-3 小时 新手友好度 72/100
conan-io/conan-center-index#31597 ·
维护者通常 1 天内回复
-
bug enhancement
难度 1/5 1 小时以内 新手友好度 90/100
AOSSIE-Org/PictoPy#1802 · 2 条评论 ·
维护者通常 3 天内回复
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
难度 2/5 1-3 小时 新手友好度 75/100
pytorch/pytorch#207247 · 1 条评论 ·
维护者通常 1 天内回复