Skip to content

Commit 1005c51

Browse files
suofacebook-github-bot
authored andcommitted
add monarch_no_torch wheel and fbpkg (#502)
Summary: Pull Request resolved: #502 It's extremely useful to have have a version of monarch that does not require linking against torch. torch's ABI is not stable. This means that we need to build a wheel for each torch version that we plan to link against and match them up correctly, which is not always convenient when we are trying monarch against all sorts of random envs. So we add a monarch_no_torch wheel and fbpkg, to have a portable wheel we can install (pretty much) anywhere. ghstack-source-id: 295691115 Reviewed By: highker, colin2328 Differential Revision: D78168948 fbshipit-source-id: d3f693bc360ce173197655bfcf9d7e2cd568ebbf
1 parent 2d84744 commit 1005c51

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

python/monarch/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212
# Import before monarch to pre-load torch DSOs as, in exploded wheel flows,
1313
# our RPATHs won't correctly find them.
14-
import torch # noqa: F401
14+
try:
15+
import torch # noqa: F401
16+
except ImportError:
17+
pass
1518

1619
# submodules of monarch should not be imported in this
1720
# top-level file because it will cause them to get

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ pyre-extensions
66
cloudpickle
77
torchx-nightly
88
lark
9+
tabulate

0 commit comments

Comments
 (0)