Remove command from Runtime, move to TrainJob trainer.command
Kubeflow Trainer torch runtime auto-injects torchrun only when command is not set in the container spec. Training script is now specified at TrainJob level via trainer.command instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
00529c5ca9
commit
2b1ad10c2c
|
|
@ -278,11 +278,11 @@ kubectl get pods -l trainer.kubeflow.org/trainjob-name=<trainjob-name> \
|
||||||
|
|
||||||
## 알려진 이슈
|
## 알려진 이슈
|
||||||
|
|
||||||
### Runtime에서 `command` 설정 시 torchrun 미주입
|
### Runtime에 `command`를 설정하면 torchrun이 주입되지 않음
|
||||||
|
|
||||||
Kubeflow Trainer torch runtime은 컨테이너에 `command`가 없을 때 자동으로 torchrun을 주입하여 `RANK`, `LOCAL_RANK`, `WORLD_SIZE` 등 환경변수를 설정합니다. Runtime에서 `command`를 직접 지정하면 torchrun 주입이 우회되어 분산 학습 환경변수가 설정되지 않습니다.
|
Kubeflow Trainer torch runtime은 컨테이너에 `command`가 없을 때 자동으로 torchrun을 주입하여 `RANK`, `LOCAL_RANK`, `WORLD_SIZE` 등 환경변수를 설정합니다. Runtime에서 `command`를 직접 지정하면 torchrun 주입이 우회됩니다.
|
||||||
|
|
||||||
현재 `volcano-trainjob-integration.yaml`의 Runtime에는 `command`가 설정되어 있으므로, 학습 스크립트 실행 방식을 조정해야 합니다.
|
따라서 **Runtime에는 `command`를 넣지 않고**, TrainJob의 `trainer.command`에서 학습 스크립트를 지정해야 합니다.
|
||||||
|
|
||||||
### JAX ClusterTrainingRuntime 미지원
|
### JAX ClusterTrainingRuntime 미지원
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -320,9 +320,6 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: node
|
- name: node
|
||||||
image: nvcr.io/nvidia/pytorch:24.10-py3
|
image: nvcr.io/nvidia/pytorch:24.10-py3
|
||||||
command:
|
|
||||||
- python
|
|
||||||
- /workspace/scripts/train_nccl.py
|
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
capabilities:
|
capabilities:
|
||||||
|
|
@ -378,6 +375,9 @@ spec:
|
||||||
name: torch-distributed-volcano
|
name: torch-distributed-volcano
|
||||||
trainer:
|
trainer:
|
||||||
image: nvcr.io/nvidia/pytorch:24.10-py3
|
image: nvcr.io/nvidia/pytorch:24.10-py3
|
||||||
|
command:
|
||||||
|
- python
|
||||||
|
- /workspace/scripts/train_nccl.py
|
||||||
numNodes: 2
|
numNodes: 2
|
||||||
resourcesPerNode:
|
resourcesPerNode:
|
||||||
requests:
|
requests:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue