torchmonarch-nightly 2025.8.1__cp310-cp310-manylinux2014_x86_64.whl → 2025.9.3__cp310-cp310-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 +0 -0
- monarch/_src/actor/actor_mesh.py +414 -216
- monarch/_src/actor/allocator.py +75 -6
- monarch/_src/actor/bootstrap_main.py +7 -4
- monarch/_src/actor/code_sync/__init__.py +2 -0
- monarch/_src/actor/debugger/__init__.py +7 -0
- monarch/_src/actor/{debugger.py → debugger/debugger.py} +246 -135
- monarch/_src/actor/{pdb_wrapper.py → debugger/pdb_wrapper.py} +62 -23
- monarch/_src/actor/endpoint.py +27 -45
- monarch/_src/actor/future.py +86 -24
- monarch/_src/actor/host_mesh.py +125 -0
- monarch/_src/actor/logging.py +94 -0
- monarch/_src/actor/pickle.py +25 -0
- monarch/_src/actor/proc_mesh.py +423 -156
- monarch/_src/actor/python_extension_methods.py +90 -0
- monarch/_src/actor/shape.py +8 -1
- monarch/_src/actor/source_loader.py +45 -0
- monarch/_src/actor/telemetry/__init__.py +172 -0
- monarch/_src/actor/telemetry/rust_span_tracing.py +6 -39
- monarch/_src/debug_cli/__init__.py +7 -0
- monarch/_src/debug_cli/debug_cli.py +43 -0
- monarch/_src/tensor_engine/rdma.py +64 -9
- monarch/_testing.py +1 -3
- monarch/actor/__init__.py +24 -4
- monarch/common/_C.so +0 -0
- monarch/common/device_mesh.py +14 -0
- monarch/common/future.py +10 -0
- monarch/common/remote.py +14 -25
- monarch/common/tensor.py +12 -0
- monarch/debug_cli/__init__.py +7 -0
- monarch/debug_cli/__main__.py +12 -0
- monarch/fetch.py +2 -2
- monarch/gradient/_gradient_generator.so +0 -0
- monarch/gradient_generator.py +4 -2
- monarch/mesh_controller.py +34 -14
- monarch/monarch_controller +0 -0
- monarch/tools/colors.py +25 -0
- monarch/tools/commands.py +42 -7
- monarch/tools/components/hyperactor.py +1 -1
- monarch/tools/config/__init__.py +31 -4
- monarch/tools/config/defaults.py +13 -3
- monarch/tools/config/environment.py +45 -0
- monarch/tools/config/workspace.py +165 -0
- monarch/tools/mesh_spec.py +2 -0
- monarch/utils/__init__.py +9 -0
- monarch/utils/utils.py +78 -0
- tests/error_test_binary.py +5 -3
- tests/python_actor_test_binary.py +52 -0
- tests/test_actor_error.py +142 -14
- tests/test_alloc.py +1 -1
- tests/test_allocator.py +59 -72
- tests/test_coalescing.py +1 -1
- tests/test_debugger.py +639 -45
- tests/test_env_before_cuda.py +4 -4
- tests/test_mesh_trait.py +38 -0
- tests/test_python_actors.py +979 -75
- tests/test_rdma.py +7 -6
- tests/test_tensor_engine.py +6 -6
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/METADATA +82 -4
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/RECORD +64 -48
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/WHEEL +0 -0
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/entry_points.txt +0 -0
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/licenses/LICENSE +0 -0
- {torchmonarch_nightly-2025.8.1.dist-info → torchmonarch_nightly-2025.9.3.dist-info}/top_level.txt +0 -0
tests/test_env_before_cuda.py
CHANGED
@@ -75,9 +75,9 @@ class TestEnvBeforeCuda(unittest.IsolatedAsyncioTestCase):
|
|
75
75
|
|
76
76
|
spec = AllocSpec(AllocConstraints(), gpus=1, hosts=1)
|
77
77
|
allocator = LocalAllocator()
|
78
|
-
alloc =
|
78
|
+
alloc = allocator.allocate(spec)
|
79
79
|
|
80
|
-
proc_mesh =
|
80
|
+
proc_mesh = ProcMesh.from_alloc(alloc, setup=setup_cuda_env)
|
81
81
|
|
82
82
|
try:
|
83
83
|
actor = await proc_mesh.spawn("cuda_init", CudaInitTestActor)
|
@@ -110,7 +110,7 @@ class TestEnvBeforeCuda(unittest.IsolatedAsyncioTestCase):
|
|
110
110
|
for name, value in cuda_env_vars.items():
|
111
111
|
os.environ[name] = value
|
112
112
|
|
113
|
-
proc_mesh_instance =
|
113
|
+
proc_mesh_instance = proc_mesh(gpus=1, hosts=1, setup=setup_cuda_env)
|
114
114
|
|
115
115
|
try:
|
116
116
|
actor = await proc_mesh_instance.spawn("cuda_init", CudaInitTestActor)
|
@@ -136,7 +136,7 @@ class TestEnvBeforeCuda(unittest.IsolatedAsyncioTestCase):
|
|
136
136
|
"CUDA_DEVICE_MAX_CONNECTIONS": "1",
|
137
137
|
}
|
138
138
|
|
139
|
-
proc_mesh_instance =
|
139
|
+
proc_mesh_instance = proc_mesh(gpus=1, hosts=1, env=cuda_env_vars)
|
140
140
|
|
141
141
|
try:
|
142
142
|
actor = await proc_mesh_instance.spawn("cuda_init", CudaInitTestActor)
|
tests/test_mesh_trait.py
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2
|
+
# All rights reserved.
|
3
|
+
#
|
4
|
+
# This source code is licensed under the BSD-style license found in the
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
6
|
+
|
7
|
+
from typing import Iterable
|
8
|
+
|
9
|
+
from monarch._src.actor.shape import MeshTrait, NDSlice, Shape, Slice
|
10
|
+
|
11
|
+
|
12
|
+
class Mesh(MeshTrait):
|
13
|
+
"""
|
14
|
+
A simple implementor of MeshTrait.
|
15
|
+
"""
|
16
|
+
|
17
|
+
def __init__(self, shape: Shape, values: list[int]) -> None:
|
18
|
+
self._shape = shape
|
19
|
+
self._values = values
|
20
|
+
|
21
|
+
def _new_with_shape(self, shape: Shape) -> "Mesh":
|
22
|
+
return Mesh(shape, self._values)
|
23
|
+
|
24
|
+
@property
|
25
|
+
def _ndslice(self) -> NDSlice:
|
26
|
+
return self._shape.ndslice
|
27
|
+
|
28
|
+
@property
|
29
|
+
def _labels(self) -> Iterable[str]:
|
30
|
+
return self._shape.labels
|
31
|
+
|
32
|
+
|
33
|
+
def test_len() -> None:
|
34
|
+
s = Slice(offset=0, sizes=[2, 3], strides=[3, 1])
|
35
|
+
shape = Shape(["label0", "label1"], s)
|
36
|
+
|
37
|
+
mesh = Mesh(shape, [1, 2, 3, 4, 5, 6])
|
38
|
+
assert 6 == len(mesh)
|