torchmonarch-nightly 2025.7.30__cp312-cp312-manylinux2014_x86_64.whl → 2025.7.31__cp312-cp312-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
monarch/_rust_bindings.so CHANGED
Binary file
Binary file
tests/test_allocator.py CHANGED
@@ -104,7 +104,9 @@ class TestActor(Actor):
104
104
 
105
105
  @contextlib.contextmanager
106
106
  def remote_process_allocator(
107
- addr: Optional[str] = None, timeout: Optional[int] = None
107
+ addr: Optional[str] = None,
108
+ timeout: Optional[int] = None,
109
+ envs: Optional[dict[str, str]] = None,
108
110
  ) -> Generator[str, None, None]:
109
111
  """Start a remote process allocator on addr. If timeout is not None, have it
110
112
  timeout after that many seconds if no messages come in"""
@@ -120,16 +122,19 @@ def remote_process_allocator(
120
122
  if timeout is not None:
121
123
  args.append(f"--timeout-sec={timeout}")
122
124
 
125
+ env = {
126
+ # prefix PATH with this test module's directory to
127
+ # give 'process_allocator' and 'monarch_bootstrap' binary resources
128
+ # in this test module's directory precedence over the installed ones
129
+ # useful in BUCK where these binaries are added as 'resources' of this test target
130
+ "PATH": f"{package_path}:{os.getenv('PATH', '')}",
131
+ "RUST_LOG": "debug",
132
+ }
133
+ if envs:
134
+ env.update(envs)
123
135
  process_allocator = subprocess.Popen(
124
136
  args=args,
125
- env={
126
- # prefix PATH with this test module's directory to
127
- # give 'process_allocator' and 'monarch_bootstrap' binary resources
128
- # in this test module's directory precedence over the installed ones
129
- # useful in BUCK where these binaries are added as 'resources' of this test target
130
- "PATH": f"{package_path}:{os.getenv('PATH', '')}",
131
- "RUST_LOG": "debug",
132
- },
137
+ env=env,
133
138
  )
134
139
  try:
135
140
  yield addr
@@ -233,6 +238,26 @@ class TestRemoteAllocator(unittest.IsolatedAsyncioTestCase):
233
238
  computed_world_sizes = {p.rank: v for p, v in list(computed.flatten("rank"))}
234
239
  self.assertDictEqual(expected_world_sizes, computed_world_sizes)
235
240
 
241
+ async def test_allocate_failure_message(self) -> None:
242
+ spec = AllocSpec(AllocConstraints(), host=2, gpu=4)
243
+
244
+ with self.assertRaisesRegex(
245
+ Exception,
246
+ r"exited with code 1: Traceback \(most recent call last\).*",
247
+ ):
248
+ with remote_process_allocator(
249
+ envs={"MONARCH_ERROR_DURING_BOOTSTRAP_FOR_TESTING": "1"}
250
+ ) as host1, remote_process_allocator(
251
+ envs={"MONARCH_ERROR_DURING_BOOTSTRAP_FOR_TESTING": "1"}
252
+ ) as host2:
253
+ allocator = RemoteAllocator(
254
+ world_id="test_remote_allocator",
255
+ initializer=StaticRemoteAllocInitializer(host1, host2),
256
+ heartbeat_interval=_100_MILLISECONDS,
257
+ )
258
+ alloc = await allocator.allocate(spec)
259
+ await ProcMesh.from_alloc(alloc)
260
+
236
261
  async def test_call_allocate_twice(self) -> None:
237
262
  class DeletingAllocInitializer(StaticRemoteAllocInitializer):
238
263
  """test initializer that removes the last address from the list each time initialize_alloc() is called
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: torchmonarch-nightly
3
- Version: 2025.7.30
3
+ Version: 2025.7.31
4
4
  Summary: Monarch: Single controller library
5
5
  Author: Meta
6
6
  Author-email: oncall+monarch@xmail.facebook.com
@@ -1,5 +1,5 @@
1
1
  monarch/__init__.py,sha256=mgKiyD1kxky-1pvhMlNfF4VmxWnhi-FSYZNFzkW1BEM,7052
2
- monarch/_rust_bindings.so,sha256=Ejh3P43URYPy72H2coIAXiMniWeDx4yLTOKXN8Ux_mU,50331992
2
+ monarch/_rust_bindings.so,sha256=EVey_kdCsX7PeKw-hiovGrTUfonCOaVBnE1paArMZlY,50334496
3
3
  monarch/_testing.py,sha256=_3MYNMq-_0T1qXCj2vxrW13GlWGdUuVFMskQF2Gsw_o,7877
4
4
  monarch/actor_mesh.py,sha256=VtPU9syi_vUdwDSJJ639Z4Y_EcWZUScyoj0lQ88RQPs,421
5
5
  monarch/bootstrap_main.py,sha256=39OZpNMrfvvNJf-iwuNzgslzYA_ItaRPHfXGn_V74N0,524
@@ -8,7 +8,7 @@ monarch/fetch.py,sha256=JMxC8HdWMvpik0T4E6e-gfxvmNnOkA0ul4eo4R3Jg_o,1712
8
8
  monarch/gradient_generator.py,sha256=Rl3dmXGceTdCc1mYBg2JciR88ywGPnW7TVkL86KwqEA,6366
9
9
  monarch/memory.py,sha256=ol86dBhFAJqg78iF25-BuK0wuwj1onR8FIioZ_B0gjw,1377
10
10
  monarch/mesh_controller.py,sha256=R9ZnVV89wYva0QTAwOgHi_PkjYPEj_7_yF9810NHPak,14675
11
- monarch/monarch_controller,sha256=iHg_ZWhBCzTgpzORiyQUjMkxSLDccD_X3K63EwJwwaI,24039048
11
+ monarch/monarch_controller,sha256=SdvQrZHNC46WfgNgo-Fl4KABBgNo1uQhsfxpS_FEeHU,24032912
12
12
  monarch/notebook.py,sha256=zu9MKDFKf1-rCM2TqFSRJjMBeiWuKcJSyUFLvoZRQzs,25949
13
13
  monarch/opaque_module.py,sha256=jCcg0DjbcEVXA9WNG0NhUzGteLHOJLTZEBvrIYJIAns,10436
14
14
  monarch/opaque_object.py,sha256=x1LoX6RIMGh4ux52xIfhPgoh6PhZHdkf9bMccHW3DW0,2808
@@ -147,7 +147,7 @@ tests/sleep_binary.py,sha256=XfLYaAfwm9xgzM-svs8fhAeFhwYIg6SyVEnx4e6wbUw,1009
147
147
  tests/test_actor_error.py,sha256=U7QL1jRn-YpS-o62imt7HFLPtaSbwMBu9xpD09Mb-Bc,20875
148
148
  tests/test_actor_shape.py,sha256=ph-RC9sMNHWptZOCwQqMfG4lIUEzhp_pEnfhITeYdHM,4533
149
149
  tests/test_alloc.py,sha256=IW7yJSaKxhOYc8SJtFyREakDUwiKWq9M0CGgYyBYHoc,743
150
- tests/test_allocator.py,sha256=4LcUB4QRNGDp0qBWAyLM6ektmoxpO922f-NcHZziJ_w,28762
150
+ tests/test_allocator.py,sha256=DpQhygQ4jB19g-aY-BFR61J-gYbG-hDlTNPVuQ4Fmn0,29730
151
151
  tests/test_coalescing.py,sha256=JZ4YgQNlWWs7N-Z8KCCXQPANcuyyXEKjeHIXYbPnQhk,15606
152
152
  tests/test_controller.py,sha256=CIMb-ApmBcBj1eCqccDUAbVyyJWMGooAha5gQk0AoeY,31452
153
153
  tests/test_debugger.py,sha256=9opgQXCBuZ1Z-7uOKI-FuGB0jLbLLilmWQKq0sE-dgQ,21950
@@ -170,9 +170,9 @@ tests/simulator/test_profiling.py,sha256=TGYCfzTLdkpIwnOuO6KApprmrgPIRQe60KRX3wk
170
170
  tests/simulator/test_simulator.py,sha256=LO8lA0ssY-OGEBL5ipEu74f97Y765TEwfUOv-DtIptM,14568
171
171
  tests/simulator/test_task.py,sha256=ipqBDuDAysuo1xOB9S5psaFvwe6VATD43IovCTSs0t4,2327
172
172
  tests/simulator/test_worker.py,sha256=QrWWIJ3HDgDLkBPRc2mwYPlOQoXQcj1qRfc0WUfKkFY,3507
173
- torchmonarch_nightly-2025.7.30.dist-info/licenses/LICENSE,sha256=e0Eotbf_rHOYPuEUlppIbvwy4SN98CZnl_hqwvbDA4Q,1530
174
- torchmonarch_nightly-2025.7.30.dist-info/METADATA,sha256=TLI6C3RGzWoCq2Ual0X4CEz_oUaMFvHdAxIsAI6yxaI,3852
175
- torchmonarch_nightly-2025.7.30.dist-info/WHEEL,sha256=lduYNUEDASmtUEDemd8SmeX1qOMvvA6YKAbAo1Qbwk8,104
176
- torchmonarch_nightly-2025.7.30.dist-info/entry_points.txt,sha256=60QVSpYVzkzS4iDOiLp0fsLxVp47X3J2l3v7W-59LMo,117
177
- torchmonarch_nightly-2025.7.30.dist-info/top_level.txt,sha256=E-ZssZzyM17glpVrh-S9--qJ-w9p2EjuYOuNw9tQ4Eg,33
178
- torchmonarch_nightly-2025.7.30.dist-info/RECORD,,
173
+ torchmonarch_nightly-2025.7.31.dist-info/licenses/LICENSE,sha256=e0Eotbf_rHOYPuEUlppIbvwy4SN98CZnl_hqwvbDA4Q,1530
174
+ torchmonarch_nightly-2025.7.31.dist-info/METADATA,sha256=V4U9RkS-KxbvPEmkrhGYp3WRtTXluOVzAl9ktisydYw,3852
175
+ torchmonarch_nightly-2025.7.31.dist-info/WHEEL,sha256=lduYNUEDASmtUEDemd8SmeX1qOMvvA6YKAbAo1Qbwk8,104
176
+ torchmonarch_nightly-2025.7.31.dist-info/entry_points.txt,sha256=60QVSpYVzkzS4iDOiLp0fsLxVp47X3J2l3v7W-59LMo,117
177
+ torchmonarch_nightly-2025.7.31.dist-info/top_level.txt,sha256=E-ZssZzyM17glpVrh-S9--qJ-w9p2EjuYOuNw9tQ4Eg,33
178
+ torchmonarch_nightly-2025.7.31.dist-info/RECORD,,