Skip to content

Commit 47464ff

Browse files
priyaramanifacebook-github-bot
authored andcommitted
Torchxconfig (pytorch#595)
Summary: Pull Request resolved: pytorch#595 As part of internal docs reviva, moving over some Meta specific content from https://internalfb.com/intern/wiki/PyTorch_R2P/TorchX/Project_Setup_(fbcode)/ and https://internalfb.com/intern/wiki/PyTorch_R2P/TorchX/Configuring_(.torchxconfig)/ that are not already captured in https://pytorch.org/torchx/latest/runner.config.html Reviewed By: d4l3k Differential Revision: D39190047 fbshipit-source-id: a1389ca19e8e66d8346e71210c8e5abdee65fc9b
1 parent 6c79e32 commit 47464ff

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Documentation
5353
:caption: Usage (Meta)
5454

5555
fb/quickstart.md
56+
fb/setup.md
5657
fb/cogwheel.rst
5758
fb/named_resources.rst
5859

torchx/runner/config.py

+15
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@
7474
variable TORCHX_CONFIG. It also disables hierarchy loading configs from multiple
7575
directories as the cases otherwise.
7676
77+
#. User level .torchxconfig
78+
In addition to the project-level .torchxconfig at the root of the project directory,
79+
you can create one in ``$HOME/.torchxconfig`` to override or specify additional default configs.
80+
This config file will get overlaid on top of the one defined at the project root.
81+
82+
#. Config options take the following precedence (high to low):
83+
1. Options specified directly from the CLI
84+
2. If TORCHXCONFIG env variable is set, the options specified in that file
85+
3. If TORCHXCONFIG env variable is not set,
86+
a. Options specified in user level .torchxconfig (``$HOME/.torchxconfig``)
87+
b. Options specified in .torchxconfig
88+
4. Any default values in the code
89+
90+
Note that malformed or unrecognized options are simply skipped and not applied
91+
7792
**Component Config**
7893
7994
You can specify component defaults by adding a section prefixed with

0 commit comments

Comments
 (0)