File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Expand file tree Collapse file tree 1 file changed +41
-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
+
92
+ **CLI Subcommand Config**
93
+
94
+ The default arguments for the ``torchx`` subcommands can be overwritten. Any
95
+ ``--foo FOO`` argument can be set via the correspond ``[cli:<cmd>]`` settings
96
+ block.
97
+
98
+ For the ``run`` command you can additionally set ``component`` to set the
99
+ default component to run.
100
+
101
+ .. code-block:: ini
102
+
103
+ [cli:run]
104
+ component=dist.ddp
105
+ scheduler=local_docker
106
+ workspace=file://some_workspace
107
+
108
+
69
109
Programmatic Usage
70
110
~~~~~~~~~~~~~~~~~~~
71
111
@@ -265,7 +305,7 @@ def load_sections(
265
305
j = 1x2
266
306
image = ghcr.io/foo:1
267
307
268
- # calling `load_component_defaults (prefix="component")` returns
308
+ # calling `load_sections (prefix="component")` returns
269
309
# {
270
310
# "dist.ddp": {
271
311
# "j":"1x2",
You can’t perform that action at this time.
0 commit comments