7
7
:saveKey =" deterministic.name"
8
8
/>
9
9
<h2 class =" training" >Distributed Training (NCCL backend)</h2 >
10
- <FormRadio :options =" [launch, spawn]" saveKey =" dist" />
11
- <template v-for =" (d , index ) in distributedConfigs " :key =" index " >
12
- <FormInput :label =" d.description" :type =" d.type" :saveKey =" d.name" />
13
- </template >
10
+ <FormCheckbox label =" Use distributed training" saveKey =" use_dist" />
11
+ <div v-show =" store.config.use_dist" >
12
+ <FormRadio :options =" [launch, spawn]" saveKey =" dist" defaultV =" launch" />
13
+ <FormInput
14
+ :label =" nproc_per_node.description"
15
+ :type =" nproc_per_node.type"
16
+ :saveKey =" nproc_per_node.name"
17
+ :defaultV =" nproc_per_node.default"
18
+ />
19
+ <FormInput
20
+ :label =" nnodes.description"
21
+ :type =" nnodes.type"
22
+ :saveKey =" nnodes.name"
23
+ :defaultV =" nnodes.default"
24
+ />
25
+ <FormInput
26
+ :label =" master_addr.description"
27
+ :type =" master_addr.type"
28
+ :saveKey =" master_addr.name"
29
+ :defaultV =" master_addr.default"
30
+ v-show =" store.config.nnodes > 1"
31
+ />
32
+ <FormInput
33
+ :label =" master_port.description"
34
+ :type =" master_port.type"
35
+ :saveKey =" master_port.name"
36
+ :defaultV =" master_port.default"
37
+ v-show =" store.config.nnodes > 1"
38
+ />
39
+ </div >
14
40
</div >
15
41
</template >
16
42
@@ -20,26 +46,37 @@ import { training } from '../metadata/metadata.json'
20
46
import FormCheckbox from ' ./FormCheckbox.vue'
21
47
import FormInput from ' ./FormInput.vue'
22
48
import FormRadio from ' ./FormRadio.vue'
49
+ import { store } from ' ../store.js'
23
50
24
51
export default {
25
52
components: { FormCheckbox, FormInput, FormRadio },
26
53
setup () {
27
- const { deterministic , launch , spawn , ... distributedConfigs } = training
54
+ const {
55
+ deterministic ,
56
+ launch ,
57
+ spawn ,
58
+ nproc_per_node ,
59
+ nnodes ,
60
+ master_addr ,
61
+ master_port
62
+ } = training
28
63
const isDeterministic = ref (false )
29
- const distributedValue = ref ({})
30
64
31
65
// computed properties
32
66
const saveDeterministic = computed (() => {
33
67
saveConfig (deterministic .name , isDeterministic .value )
34
68
})
35
69
return {
70
+ store,
71
+ deterministic,
36
72
launch,
37
73
spawn,
38
- deterministic,
74
+ nproc_per_node,
75
+ nnodes,
76
+ master_addr,
77
+ master_port,
39
78
isDeterministic,
40
79
saveDeterministic,
41
- distributedConfigs,
42
- distributedValue,
43
80
saveDistributed
44
81
}
45
82
}
0 commit comments