From 8959456ceb513dab37ffc4f3a154712431ec4625 Mon Sep 17 00:00:00 2001 From: Kiuk Chung Date: Wed, 9 Jul 2025 12:28:18 -0700 Subject: [PATCH] (10/n - non-xlformers conda-on-mast mvp)(monarch-fb/BUCK) Include torchx-fb as part of monarch.whl (#439) Summary: Pull Request resolved: https://github.com/pytorch-labs/monarch/pull/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 --- python/monarch/tools/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/monarch/tools/commands.py b/python/monarch/tools/commands.py index a30377e9..6ca2ea6f 100644 --- a/python/monarch/tools/commands.py +++ b/python/monarch/tools/commands.py @@ -21,7 +21,7 @@ ) from monarch.tools.mesh_spec import mesh_spec_from_metadata, ServerSpec -from torchx.runner import Runner +from torchx.runner import Runner # @manual=//torchx/runner:lib_core from torchx.specs import AppDef, AppDryRunInfo, AppState, CfgVal, parse_app_handle from torchx.specs.builders import parse_args from torchx.util.types import decode, decode_optional