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 1515CLI Usage
1616~~~~~~~~~~~
1717
18+
19+ **Scheduler Config**
20+
1821#. ``cd`` into the directory where you want the ``.torchxconfig`` file to be dropped.
1922 The CLI only picks up ``.torchxconfig`` files from the current-working-directory (CWD)
2023 so chose a directory where you typically run ``torchx`` from. Typically this
6669
6770 $ torchx run -s local_cwd ./my_component.py:train
6871
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+
69109Programmatic Usage
70110~~~~~~~~~~~~~~~~~~~
71111
@@ -265,7 +305,7 @@ def load_sections(
265305 j = 1x2
266306 image = ghcr.io/foo:1
267307
268- # calling `load_component_defaults (prefix="component")` returns
308+ # calling `load_sections (prefix="component")` returns
269309 # {
270310 # "dist.ddp": {
271311 # "j":"1x2",
You can’t perform that action at this time.
0 commit comments