-
Notifications
You must be signed in to change notification settings - Fork 146
(torchx/workspace) Support multi-project/directory workspace #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
2683a61
to
1a366c7
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
1a366c7
to
0846364
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
0846364
to
096868a
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
096868a
to
a7c3daf
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
a7c3daf
to
4e97e31
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
4e97e31
to
4581fed
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
4581fed
to
9c3fb4c
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
9c3fb4c
to
9593260
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
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
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
9593260
to
33ea153
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
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
33ea153
to
ec62c8e
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
ec62c8e
to
18cb679
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
18cb679
to
14e1e0d
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
14e1e0d
to
8fb543a
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
8fb543a
to
663483c
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
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
663483c
to
e8181b6
Compare
@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554. |
Summary:
Usage:
In your
.torchxconfig
file specify multi-project workspace as follows:Then the workspace is built as:
/home/$USER/github/myproj/**
->$REMOTE_ROOT/**
/home/$USER/github/verl/**
->$REMOTE_ROOT/verl/**
/home/$USER/.torchxconfig
->$REMOTE_ROOT/verl/.torchxconfig
Notes:
The mappings are basically like BUCK
python_library
'sresoruce
attribute. Mapping to an empty string, or simply leaving the target blank (as we did formyproj
in the example above) copies the contents of the src dir directly into the remote workspace rootFiles 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:
copies
.torchxconfig
into$REMOTE_ROOT/verl/.torchxconfig
. However if we switching the order of the projects won't work:This would copy
.torchxconfig
to the file calledverl
in$REMOTE_ROOT/verl
, thengithub/verl
would fail to copy.Differential Revision: D82169554