Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/components/TabTraining.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
:label="deterministic.description"
:saveKey="deterministic.name"
/>
<h2 class="training">Distributed Training (NCCL backend)</h2>
<h2 class="training">Distributed Training</h2>
<FormCheckbox label="Use distributed training" saveKey="use_dist" />
<div v-show="store.config.use_dist">
<h2>Choose a Backend</h2>
<FormSelect
required
:saveKey="backend.name"
:label="backend.description"
:options="backend.options"
/>
<FormRadio :options="[launch, spawn]" saveKey="dist" defaultV="launch" />
<FormInput
:label="nproc_per_node.description"
Expand Down Expand Up @@ -46,13 +53,15 @@ import { training } from '../metadata/metadata.json'
import FormCheckbox from './FormCheckbox.vue'
import FormInput from './FormInput.vue'
import FormRadio from './FormRadio.vue'
import FormSelect from './FormSelect.vue'
import { store } from '../store.js'

export default {
components: { FormCheckbox, FormInput, FormRadio },
components: { FormCheckbox, FormInput, FormRadio, FormSelect },
setup() {
const {
deterministic,
backend,
launch,
spawn,
nproc_per_node,
Expand All @@ -69,6 +78,7 @@ export default {
return {
store,
deterministic,
backend,
launch,
spawn,
nproc_per_node,
Expand Down
5 changes: 5 additions & 0 deletions src/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"description": "Master node port for torch native backends (mandatory if you have filled number of nodes)",
"min": 0,
"default": 8080
},
"backend": {
"name": "backend",
"description": "Choose a Backend",
"options": ["NCCL", "Gloo"]
}
},
"handlers": {
Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-text-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -44,7 +44,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -55,7 +55,7 @@ python -m torch.distributed.launch \
python -m torch.distributed.launch \
--nproc_per_node #:::= it.nproc_per_node :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand All @@ -77,7 +77,7 @@ python main.py \
--node_rank 0 \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -89,7 +89,7 @@ python main.py \
--node_rank <node_rank> \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -99,7 +99,7 @@ python main.py \
```sh
python main.py \
--nproc_per_node #:::= it.nproc_per_node :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-vision-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -44,7 +44,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -55,7 +55,7 @@ python -m torch.distributed.launch \
python -m torch.distributed.launch \
--nproc_per_node #:::= it.nproc_per_node :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand All @@ -77,7 +77,7 @@ python main.py \
--node_rank 0 \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -89,7 +89,7 @@ python main.py \
--node_rank <node_rank> \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -99,7 +99,7 @@ python main.py \
```sh
python main.py \
--nproc_per_node #:::= it.nproc_per_node :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-vision-dcgan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -44,7 +44,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -55,7 +55,7 @@ python -m torch.distributed.launch \
python -m torch.distributed.launch \
--nproc_per_node #:::= it.nproc_per_node :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand All @@ -77,7 +77,7 @@ python main.py \
--node_rank 0 \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -89,7 +89,7 @@ python main.py \
--node_rank <node_rank> \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -99,7 +99,7 @@ python main.py \
```sh
python main.py \
--nproc_per_node #:::= it.nproc_per_node :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand Down
10 changes: 5 additions & 5 deletions src/templates/template-vision-segmentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -44,7 +44,7 @@ python -m torch.distributed.launch \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--use_env main.py \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand Down Expand Up @@ -77,7 +77,7 @@ python main.py \
--node_rank 0 \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

- Execute on worker nodes
Expand All @@ -89,7 +89,7 @@ python main.py \
--node_rank <node_rank> \
--master_addr #:::= it.master_addr :::# \
--master_port #:::= it.master_port :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } else { :::#
Expand All @@ -99,7 +99,7 @@ python main.py \
```sh
python main.py \
--nproc_per_node #:::= it.nproc_per_node :::# \
--backend nccl
--backend #:::= backend :::#
```

#::: } :::#
Expand Down