Skip to content

(10/n - non-xlformers conda-on-mast mvp)(monarch-fb/BUCK) Include torchx-fb as part of monarch.whl #439

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kiukchung
Copy link
Contributor

Summary:
To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl

To install:

pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)

WARNING: monarch + torchx doesn't work yet! this is why it is behind the --config monarch_whl.include=torchx! I'm landing this so that others can repro the error and I can get help fixing it.

Repro Instructions:

$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 

should fail with

import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call

Reviewed By: highker

Differential Revision: D77411375

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 6, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 7, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
kiukchung added a commit that referenced this pull request Jul 7, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 7, 2025
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py
```

should fail with

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 7, 2025
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py
```

should fail with

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
kiukchung added a commit that referenced this pull request Jul 8, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
kiukchung added a commit that referenced this pull request Jul 8, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 8, 2025
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py
```

should fail with

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 8, 2025
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py
```

should fail with

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
kiukchung added a commit that referenced this pull request Jul 9, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
kiukchung added a commit that referenced this pull request Jul 9, 2025
…chx-fb as part of monarch.whl (#439)

Summary:

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py 
```

should fail with 

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

kiukchung added a commit that referenced this pull request Jul 9, 2025
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

To bundle torchx-fb (with internal plugins such as being able to launch on MAST) build the wheel with:

```
buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl
```

To install:

```
pip install --force-reinstall --no-deps $(BUILD_CMD_ABOVE)
```

WARNING: monarch + torchx doesn't work yet! this is why it is behind the `--config monarch_whl.include=torchx`! I'm landing this so that others can repro the error and I can get help fixing it.

## Repro Instructions:

```
$ $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable

$ cd ~/fbsource/fbcode

$ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)

$ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
$ python main.py
```

should fail with

```
import monarch._rust_bindings
ImportError: /home/kiuk/.fbpkg_conda_envs/xlformers_finetune_conda-9648802/lib/python3.10/site-packages/monarch/../monarch/lib/libomnibus.so: undefined symbol: __kmpc_fork_call
```

Reviewed By: highker

Differential Revision: D77411375
…chx-fb as part of monarch.whl (#439)

Summary:
Pull Request resolved: #439

Includes torchx_fb in `//monarch/python/monarch:monarch.whl` so that `monarch.tools.*` module (uses torchx programmatically) works.

NOTE: Currently fails with  `AttributeError: type object '_asyncio.Task' has no attribute '_step'` (full stacktrace: P1864708102)

## Repro Instructions:

1. Activate `xlformers_finetune_conda:stable`
    ```
    $HOME/fbsource/genai/xlformers/dev/xl_conda.sh xlformers_finetune_conda:stable
    ```

2. Build and install `monarch.whl`
    ```
    $ cd ~/fbsource/fbcode

    $ pip install --force-reinstall --no-deps $(buck build @//mode/opt --show-full-simple-output --config monarch_whl.include=torchx //monarch/python/monarch:monarch.whl)
    ```
3. Run the script (should fail with P1864708102)
    ```
    $ cd ~/fbsource/fbcode/scripts/kiuk/examples/monarch_conda
    $ python main.py
    ```

Reviewed By: highker

Differential Revision: D77411375
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77411375

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 Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants