@@ -26,19 +26,19 @@ OPTION : CONFIG_NAME|CONFIG_NAMES|null
2626
2727* GROUP_DEFAULT* : An * overridable* config. e.g. ` db: mysql ` , ` db@backup: mysql ` .
2828- *** override*** : Overrides the option of a previously defined GROUP_DEFAULT.
29- - *** optional*** : By default, an OPTION that do not exist causes an error; optional suppresses the error.
29+ - *** optional*** : By default, an OPTION that do not exist causes an error; optional suppresses the error.
3030- *** null*** : A place-holder for a future override. If it is not overridden the entry is ignored.
3131
3232* CONFIG_NAME* : The name of a config, without the file system extension. e.g. ` mysql ` and not ` mysql.yaml ` .
3333
3434* CONFIG_NAMES* : A list of config names. e.g. ` [mysql, sqlite] `
3535
36- * CONFIG_GROUP* : A path to a set of configs.
37- The path is relative to the containing config.
38- It can be made absolute by prefixing it with a ` / ` .
36+ * CONFIG_GROUP* : A path to a set of configs.
37+ The path is relative to the containing config.
38+ It can be made absolute by prefixing it with a ` / ` .
3939The path separator is ` / ` regardless of the operating system.
4040
41- * OPTION* : The currently selected * CONFIG_NAME* or * CONFIG_NAMES* from a * CONFIG_GROUP* .
41+ * OPTION* : The currently selected * CONFIG_NAME* or * CONFIG_NAMES* from a * CONFIG_GROUP* .
4242
4343* PACKAGE* : Where to place the content of the config within the output config.
4444It is relative to the Package of the containing config by default. See [ Packages] ( overriding_packages.md ) .
@@ -130,7 +130,7 @@ debug: false
130130</div>
131131</div>
132132
133- A Config Group's option can also be overridden via the command line. e.g:
133+ A Config Group's option can also be overridden via the command line. e.g:
134134` ` `
135135$ python my_app.py server/db=sqlite
136136```
@@ -147,7 +147,7 @@ By default, the content of a config is overriding the content of configs in the
147147
148148``` yaml title="config.yaml" {5}
149149defaults :
150- - db : mysql
150+ - db : mysql
151151
152152db :
153153 host : backup
168168</div >
169169</div >
170170
171- The ` _self_ ` entry determines the relative position of ** this** config in the Defaults List.
171+ The ` _self_ ` entry determines the relative position of ** this** config in the Defaults List.
172172If it is not specified, it is added automatically as the last item.
173173
174174<div className =" row " >
@@ -177,7 +177,7 @@ If it is not specified, it is added automatically as the last item.
177177``` yaml title="config.yaml" {2,6}
178178defaults :
179179 - _self_
180- - db : mysql # Overrides this config
180+ - db : mysql # Overrides this config
181181
182182db :
183183 host : backup
196196</div >
197197</div >
198198
199- With ` _self_ ` at the top of the Defaults List, the host field defined in * config.yaml* now precedes the host field defined
199+ With ` _self_ ` at the top of the Defaults List, the host field defined in * config.yaml* now precedes the host field defined
200200in * db/mysql.yaml* , and as a result is overridden.
201201
202202## Interpolation in the Defaults List
@@ -208,10 +208,10 @@ defaults:
208208 - db : mysql
209209 - combination_specific_config : ${server}_${db} # apache_mysql
210210` ` `
211- Interpolation keys can be config groups with any @package overrides.
211+ Interpolation keys can be config groups with any @package overrides.
212212For example: ` ${db/engine}`, `${db@backup}`
213213
214- The selected option for *combination_specific_config* depends on the final selected options for *db* and *server*.
214+ The selected option for *combination_specific_config* depends on the final selected options for *db* and *server*.
215215e.g., If *db* is overridden to *sqlite*, *combination_specific_config* will become *apache_sqlite*.
216216
217217# ### Restrictions:
@@ -236,61 +236,63 @@ You can inspect these artifacts via command line flags:
236236- ` --cfg job|hydra|all` Shows the Output Config.
237237
238238Example outputs :
239- <details><summary>python my_app.py <b>--info defaults-tree</b></summary>
240-
241- ` ` ` yaml title=""
242- <root>:
243- hydra/config:
244- hydra/hydra_logging: default
245- hydra/job_logging: default
246- hydra/launcher: basic
247- hydra/sweeper: basic
248- hydra/output: default
249- hydra/help: default
250- hydra/hydra_help: default
251- _self_
252- config:
253- server/apache:
254- server/db: mysql
239+
240+ <details>
241+ <summary>python my_app.py <b>--info defaults-tree</b></summary>
242+ ` ` ` yaml title=""
243+ <root>:
244+ hydra/config:
245+ hydra/hydra_logging: default
246+ hydra/job_logging: default
247+ hydra/launcher: basic
248+ hydra/sweeper: basic
249+ hydra/output: default
250+ hydra/help: default
251+ hydra/hydra_help: default
255252 _self_
256- _self_
257- ` ` `
253+ config:
254+ server/apache:
255+ server/db: mysql
256+ _self_
257+ _self_
258+ ` ` `
258259</details>
259- <details><summary>python my_app.py <b>--info defaults</b></summary>
260-
261- ` ` ` text
262- Defaults List
263- *************
264- | Config path | Package | _self_ | Parent |
265- -------------------------------------------------------------------------------
266- | hydra/hydra_logging/default | hydra.hydra_logging | False | hydra/config |
267- | hydra/job_logging/default | hydra.job_logging | False | hydra/config |
268- | hydra/launcher/basic | hydra.launcher | False | hydra/config |
269- | hydra/sweeper/basic | hydra.sweeper | False | hydra/config |
270- | hydra/output/default | hydra | False | hydra/config |
271- | hydra/help/default | hydra.help | False | hydra/config |
272- | hydra/hydra_help/default | hydra.hydra_help | False | hydra/config |
273- | hydra/config | hydra | True | <root> |
274- | server/db/mysql | server.db | False | server/apache |
275- | server/apache | server | True | config |
276- | config | | True | <root> |
277- -------------------------------------------------------------------------------
278- ` ` `
260+ <details>
261+ <summary>python my_app.py <b>--info defaults</b></summary>
262+
263+ ` ` ` text
264+ Defaults List
265+ *************
266+ | Config path | Package | _self_ | Parent |
267+ -------------------------------------------------------------------------------
268+ | hydra/hydra_logging/default | hydra.hydra_logging | False | hydra/config |
269+ | hydra/job_logging/default | hydra.job_logging | False | hydra/config |
270+ | hydra/launcher/basic | hydra.launcher | False | hydra/config |
271+ | hydra/sweeper/basic | hydra.sweeper | False | hydra/config |
272+ | hydra/output/default | hydra | False | hydra/config |
273+ | hydra/help/default | hydra.help | False | hydra/config |
274+ | hydra/hydra_help/default | hydra.hydra_help | False | hydra/config |
275+ | hydra/config | hydra | True | <root> |
276+ | server/db/mysql | server.db | False | server/apache |
277+ | server/apache | server | True | config |
278+ | config | | True | <root> |
279+ -------------------------------------------------------------------------------
280+ ` ` `
279281</details>
280- <details><summary>python my_app.py <b>--cfg job</b></summary>
281-
282- ` ` ` yaml
283- server:
284- db:
285- name: mysql
286- name: apache
287- debug: false
288- ` ` `
282+ <details>
283+ <summary>python my_app.py <b>--cfg job</b></summary>
284+
285+ ` ` ` yaml
286+ server:
287+ db:
288+ name: mysql
289+ name: apache
290+ debug: false
291+ ` ` `
289292</details>
290293
291294# # Related topics
292295- [Packages](overriding_packages.md)
293296- [Common Patterns/Extending Configs](patterns/extending_configs.md)
294297- [Common Patterns/Configuring Experiments](patterns/configuring_experiments.md)
295298- [Selecting multiple configs from a Config Group](patterns/select_multiple_configs_from_config_group.md)
296-
0 commit comments