You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(torchx/workspace) Support multi-project/directory workspace (#1114)
Summary:
Usage:
In your `.torchxconfig` file specify multi-project workspace as follows (notice the indent after `workspace =`, this uses INI file's multiline strings and reads the multiline contents as YAML - at some point we should make .torchxconfig a toml or YAML but that's a BC breaking change):
```
[cli:run]
workspace =
/home/$USER/github/myproj:
/home/$USER/github/verl: verl
/home/$USER/.torchxconfig: verl/.torchxconfig
```
Then the workspace is built as:
1. `/home/$USER/github/myproj/**` -> `$REMOTE_ROOT/**`
1. `/home/$USER/github/verl/**` -> `$REMOTE_ROOT/verl/**`
1. `/home/$USER/.torchxconfig` -> `$REMOTE_ROOT/verl/.torchxconfig`
Notes:
* The mappings are basically like BUCK `python_library`'s `resoruce` attribute. Mapping to an empty string, or simply leaving the target blank (as we did for `myproj` in the example above) copies the contents of the src dir directly into the remote workspace root
* To copy the project dir contents directly into the remote root, map it to `""` (empty string) or leave the target blank
```
[cli:run]
workspace =
/home/$USER/github/myproj:
# same as
/home/$USER/github/myproj: ""
# same as
/home/$USER/github/myproj: ''
```
* Files can be specified as src. The target of a file can be a directory, and if so, the file will be copied into the directory. For example:
```
[cli:run]
workspace =
/home/$USER/github/verl: verl
/home/$USER/.torchxconfig: verl
```
copies `.torchxconfig` into `$REMOTE_ROOT/verl/.torchxconfig`.
* However switching the order of the projects won't work:
```
[cli:run]
workspace =
# copies .torchxconfig -> verl (verl is a file)
/home/$USER/.torchxconfig: verl
# ERROR trying to copy github/verl/** into verl/** (since verl is a file)
/home/$USER/github/verl: verl
```
Reviewed By: highker
Differential Revision: D82169554
0 commit comments