Skip to content

Conversation

kiukchung
Copy link
Contributor

Summary:
Usage:

In your .torchxconfig file specify multi-project workspace as follows:

[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/**
  2. /home/$USER/github/verl/** -> $REMOTE_ROOT/verl/**
  3. /home/$USER/.torchxconfig -> $REMOTE_ROOT/verl/.torchxconfig

Notes:

  1. 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

  2. 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 if we switching the order of the projects won't work:

[cli:run]
workspace = 
  /home/$USER/.torchxconfig: verl
  /home/$USER/github/verl: verl

This would copy .torchxconfig to the file called verl in $REMOTE_ROOT/verl, then github/verl would fail to copy.

Differential Revision: D82169554

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 12, 2025
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

kiukchung added a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 15, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

kiukchung added a commit that referenced this pull request Sep 15, 2025
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
kiukchung added a commit that referenced this pull request Sep 15, 2025
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
kiukchung added a commit that referenced this pull request Sep 15, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 15, 2025
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
kiukchung added a commit that referenced this pull request Sep 16, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 16, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

kiukchung added a commit that referenced this pull request Sep 16, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 16, 2025
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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

facebook-github-bot pushed a commit that referenced this pull request Sep 16, 2025
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
@facebook-github-bot
Copy link
Contributor

@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
@facebook-github-bot
Copy link
Contributor

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating diff in D82169554.

@facebook-github-bot facebook-github-bot merged commit f685fbe into main Sep 17, 2025
20 of 24 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D82169554 branch September 17, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants