File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 15
15
CLI Usage
16
16
~~~~~~~~~~~
17
17
18
+
19
+ **Scheduler Config**
20
+
18
21
#. ``cd`` into the directory where you want the ``.torchxconfig`` file to be dropped.
19
22
The CLI only picks up ``.torchxconfig`` files from the current-working-directory (CWD)
20
23
so chose a directory where you typically run ``torchx`` from. Typically this
66
69
67
70
$ torchx run -s local_cwd ./my_component.py:train
68
71
72
+ **Component Config**
73
+
74
+ You can specify component defaults by adding a section prefixed with
75
+ ``component:``.
76
+
77
+ .. code-block:: ini
78
+
79
+ [component:dist.ddp]
80
+ j=2x8
81
+ cpu=4
82
+
83
+ Now when you run the ``dist.ddp`` component those configs are automatically
84
+ picked up.
85
+
86
+ .. code-block:: shell-session
87
+
88
+ $ torchx run -s local_cwd dist.ddp
89
+ ... runs with -j 2x8 --cpu 4
90
+
91
+
69
92
Programmatic Usage
70
93
~~~~~~~~~~~~~~~~~~~
71
94
@@ -265,7 +288,7 @@ def load_sections(
265
288
j = 1x2
266
289
image = ghcr.io/foo:1
267
290
268
- # calling `load_component_defaults (prefix="component")` returns
291
+ # calling `load_sections (prefix="component")` returns
269
292
# {
270
293
# "dist.ddp": {
271
294
# "j":"1x2",
You can’t perform that action at this time.
0 commit comments