parallelazy 0.0.1__tar.gz → 0.0.3__tar.gz
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.
- parallelazy-0.0.3/PKG-INFO +82 -0
- parallelazy-0.0.3/README.md +67 -0
- parallelazy-0.0.3/parallelazy/__init__.py +122 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin_data.py +1 -1
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin_manager.py +6 -6
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin_rpc.py +2 -2
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin_transport.py +1 -1
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin_worker.py +4 -4
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/utils.py +1 -1
- parallelazy-0.0.3/parallelazy.egg-info/PKG-INFO +82 -0
- parallelazy-0.0.3/parallelazy.egg-info/SOURCES.txt +17 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy.egg-info/requires.txt +1 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/pyproject.toml +3 -2
- parallelazy-0.0.1/PKG-INFO +0 -17
- parallelazy-0.0.1/README.md +0 -3
- parallelazy-0.0.1/parallelazy/__init__.py +0 -43
- parallelazy-0.0.1/parallelazy/examples/__init__.py +0 -0
- parallelazy-0.0.1/parallelazy/examples/example_configuration.py +0 -194
- parallelazy-0.0.1/parallelazy/examples/example_count.py +0 -84
- parallelazy-0.0.1/parallelazy/examples/example_data_pipeline.py +0 -226
- parallelazy-0.0.1/parallelazy/examples/example_env_variables.py +0 -158
- parallelazy-0.0.1/parallelazy/examples/example_error_handling.py +0 -266
- parallelazy-0.0.1/parallelazy/examples/example_graceful_shutdown.py +0 -139
- parallelazy-0.0.1/parallelazy/examples/example_ml_training.py +0 -280
- parallelazy-0.0.1/parallelazy/examples/example_pubsub.py +0 -137
- parallelazy-0.0.1/parallelazy/examples/example_rpc_calls.py +0 -182
- parallelazy-0.0.1/parallelazy/examples/example_worker_pool.py +0 -188
- parallelazy-0.0.1/parallelazy/tests/__init__.py +0 -0
- parallelazy-0.0.1/parallelazy.egg-info/PKG-INFO +0 -17
- parallelazy-0.0.1/parallelazy.egg-info/SOURCES.txt +0 -29
- {parallelazy-0.0.1 → parallelazy-0.0.3}/LICENSE +0 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/environment_manager.py +0 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy/plugin.py +0 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy.egg-info/dependency_links.txt +0 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/parallelazy.egg-info/top_level.txt +0 -0
- {parallelazy-0.0.1 → parallelazy-0.0.3}/setup.cfg +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: parallelazy
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: A lightweight multiprocess worker-plugin framework. Topic-based pub/sub, global enviroment, using process spawn and pipes, pytorch and CUDA ready.
|
|
5
|
+
Author: Cesare Montresor
|
|
6
|
+
Project-URL: Homepage, https://github.com/cesare-montresor/parallelazy
|
|
7
|
+
Project-URL: Repository, https://github.com/cesare-montresor/parallelazy
|
|
8
|
+
Project-URL: Issues, https://github.com/cesare-montresor/parallelazy/issues
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: debugpy
|
|
13
|
+
Requires-Dist: torch
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# parallelazy
|
|
17
|
+
|
|
18
|
+
A lightweight Python plugin/worker framework with:
|
|
19
|
+
|
|
20
|
+
- isolated plugin processes started with `spawn`;
|
|
21
|
+
- topic-based publish/subscribe;
|
|
22
|
+
- shared environment values and change notifications;
|
|
23
|
+
- plugin-to-plugin RPC; and
|
|
24
|
+
- PyTorch/CUDA-aware multiprocessing support.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
python -m pip install .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import time
|
|
36
|
+
|
|
37
|
+
from parallelazy.plugin import Plugin
|
|
38
|
+
from parallelazy.plugin_manager import PluginManager
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Worker(Plugin):
|
|
42
|
+
def on_start(self):
|
|
43
|
+
self.env_set("worker.ready", True)
|
|
44
|
+
|
|
45
|
+
def main(self):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def main():
|
|
50
|
+
manager = PluginManager()
|
|
51
|
+
descriptor = Worker.Descriptor(
|
|
52
|
+
version="1.0.0",
|
|
53
|
+
author="Application team",
|
|
54
|
+
description="Example worker",
|
|
55
|
+
)
|
|
56
|
+
if not manager.load_plugin(descriptor):
|
|
57
|
+
raise RuntimeError("Plugin failed to load")
|
|
58
|
+
if not manager.start_plugin(descriptor.name):
|
|
59
|
+
raise RuntimeError("Plugin failed to start")
|
|
60
|
+
try:
|
|
61
|
+
time.sleep(0.1)
|
|
62
|
+
print(manager.env_get("worker.ready"))
|
|
63
|
+
finally:
|
|
64
|
+
manager.unload_plugin(descriptor.name)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if __name__ == "__main__":
|
|
68
|
+
main()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
Read the [documentation index](docs/index.md) for installation, concepts,
|
|
74
|
+
API reference, usage patterns, and troubleshooting.
|
|
75
|
+
|
|
76
|
+
The complete runnable examples are in
|
|
77
|
+
[examples/](examples/). For example:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
python -m examples.example_pubsub
|
|
81
|
+
python -m examples.example_rpc_calls
|
|
82
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# parallelazy
|
|
2
|
+
|
|
3
|
+
A lightweight Python plugin/worker framework with:
|
|
4
|
+
|
|
5
|
+
- isolated plugin processes started with `spawn`;
|
|
6
|
+
- topic-based publish/subscribe;
|
|
7
|
+
- shared environment values and change notifications;
|
|
8
|
+
- plugin-to-plugin RPC; and
|
|
9
|
+
- PyTorch/CUDA-aware multiprocessing support.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m pip install .
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
import time
|
|
21
|
+
|
|
22
|
+
from parallelazy.plugin import Plugin
|
|
23
|
+
from parallelazy.plugin_manager import PluginManager
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Worker(Plugin):
|
|
27
|
+
def on_start(self):
|
|
28
|
+
self.env_set("worker.ready", True)
|
|
29
|
+
|
|
30
|
+
def main(self):
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def main():
|
|
35
|
+
manager = PluginManager()
|
|
36
|
+
descriptor = Worker.Descriptor(
|
|
37
|
+
version="1.0.0",
|
|
38
|
+
author="Application team",
|
|
39
|
+
description="Example worker",
|
|
40
|
+
)
|
|
41
|
+
if not manager.load_plugin(descriptor):
|
|
42
|
+
raise RuntimeError("Plugin failed to load")
|
|
43
|
+
if not manager.start_plugin(descriptor.name):
|
|
44
|
+
raise RuntimeError("Plugin failed to start")
|
|
45
|
+
try:
|
|
46
|
+
time.sleep(0.1)
|
|
47
|
+
print(manager.env_get("worker.ready"))
|
|
48
|
+
finally:
|
|
49
|
+
manager.unload_plugin(descriptor.name)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if __name__ == "__main__":
|
|
53
|
+
main()
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Documentation
|
|
57
|
+
|
|
58
|
+
Read the [documentation index](docs/index.md) for installation, concepts,
|
|
59
|
+
API reference, usage patterns, and troubleshooting.
|
|
60
|
+
|
|
61
|
+
The complete runnable examples are in
|
|
62
|
+
[examples/](examples/). For example:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
python -m examples.example_pubsub
|
|
66
|
+
python -m examples.example_rpc_calls
|
|
67
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ModularNet Plugin System: Lightweight multiprocessing-based plugin architecture.
|
|
3
|
+
|
|
4
|
+
Provides modular plugin execution with pub/sub messaging, environment variables,
|
|
5
|
+
and service invocation.
|
|
6
|
+
|
|
7
|
+
Main Components:
|
|
8
|
+
- PluginDescriptor: Serializable plugin metadata
|
|
9
|
+
- Plugin: Abstract base class for plugins
|
|
10
|
+
- PluginManager: Plugin orchestration and management
|
|
11
|
+
- PluginWorker: Plugin subprocess worker
|
|
12
|
+
- PluginMessages: Unified IPC message protocol (Request, Response)
|
|
13
|
+
- DataExchange: Unified subscription model (topics + env vars)
|
|
14
|
+
- ManagerProxy: Client-side proxy for direct manager access from plugins
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from parallelazy.environment_manager import EnvironmentManager
|
|
18
|
+
from parallelazy.plugin import Plugin, PluginDescriptor, PluginState
|
|
19
|
+
from parallelazy.plugin_data import (
|
|
20
|
+
Channel,
|
|
21
|
+
CommandType,
|
|
22
|
+
Message,
|
|
23
|
+
PendingRequest,
|
|
24
|
+
PluginStatus,
|
|
25
|
+
ProcessStatus,
|
|
26
|
+
Queue,
|
|
27
|
+
QueueDescriptor,
|
|
28
|
+
QueueRecive,
|
|
29
|
+
QueueSend,
|
|
30
|
+
Request,
|
|
31
|
+
RequestCallback,
|
|
32
|
+
RequestEnvGet,
|
|
33
|
+
RequestEnvGetAll,
|
|
34
|
+
RequestEnvSet,
|
|
35
|
+
RequestEnvSubscribe,
|
|
36
|
+
RequestEnvUnsubscribe,
|
|
37
|
+
RequestEnvUpdate,
|
|
38
|
+
RequestPluginCall,
|
|
39
|
+
RequestPluginErrors,
|
|
40
|
+
RequestPluginStart,
|
|
41
|
+
RequestPluginStatus,
|
|
42
|
+
RequestPluginStatusAll,
|
|
43
|
+
RequestPluginStop,
|
|
44
|
+
RequestTopicAnnounce,
|
|
45
|
+
RequestTopicList,
|
|
46
|
+
RequestTopicSubscribe,
|
|
47
|
+
RequestTopicUnsubscribe,
|
|
48
|
+
Response,
|
|
49
|
+
ResponseCallback,
|
|
50
|
+
Subscriber,
|
|
51
|
+
Subscription,
|
|
52
|
+
)
|
|
53
|
+
from parallelazy.plugin_manager import PluginInfo, PluginManager
|
|
54
|
+
from parallelazy.plugin_rpc import (
|
|
55
|
+
MessageUID,
|
|
56
|
+
PluginCoreRPC,
|
|
57
|
+
PluginEnvRPC,
|
|
58
|
+
PluginLifeCycleRPC,
|
|
59
|
+
PluginRPC,
|
|
60
|
+
PluginTopicRPC,
|
|
61
|
+
)
|
|
62
|
+
from parallelazy.plugin_transport import (
|
|
63
|
+
IpcEventCuda,
|
|
64
|
+
IpcEventPool,
|
|
65
|
+
IpcEventPoolManaged,
|
|
66
|
+
mark_graph_output,
|
|
67
|
+
sanitize_for_ipc,
|
|
68
|
+
)
|
|
69
|
+
from parallelazy.plugin_worker import PluginWorker
|
|
70
|
+
|
|
71
|
+
__all__ = [
|
|
72
|
+
"EnvironmentManager",
|
|
73
|
+
"Plugin",
|
|
74
|
+
"PluginDescriptor",
|
|
75
|
+
"PluginState",
|
|
76
|
+
"Channel",
|
|
77
|
+
"CommandType",
|
|
78
|
+
"Message",
|
|
79
|
+
"PendingRequest",
|
|
80
|
+
"PluginStatus",
|
|
81
|
+
"ProcessStatus",
|
|
82
|
+
"Queue",
|
|
83
|
+
"QueueDescriptor",
|
|
84
|
+
"QueueRecive",
|
|
85
|
+
"QueueSend",
|
|
86
|
+
"Request",
|
|
87
|
+
"RequestCallback",
|
|
88
|
+
"RequestEnvGet",
|
|
89
|
+
"RequestEnvGetAll",
|
|
90
|
+
"RequestEnvSet",
|
|
91
|
+
"RequestEnvSubscribe",
|
|
92
|
+
"RequestEnvUnsubscribe",
|
|
93
|
+
"RequestEnvUpdate",
|
|
94
|
+
"RequestPluginCall",
|
|
95
|
+
"RequestPluginErrors",
|
|
96
|
+
"RequestPluginStart",
|
|
97
|
+
"RequestPluginStatus",
|
|
98
|
+
"RequestPluginStatusAll",
|
|
99
|
+
"RequestPluginStop",
|
|
100
|
+
"RequestTopicAnnounce",
|
|
101
|
+
"RequestTopicList",
|
|
102
|
+
"RequestTopicSubscribe",
|
|
103
|
+
"RequestTopicUnsubscribe",
|
|
104
|
+
"Response",
|
|
105
|
+
"ResponseCallback",
|
|
106
|
+
"Subscriber",
|
|
107
|
+
"Subscription",
|
|
108
|
+
"PluginInfo",
|
|
109
|
+
"PluginManager",
|
|
110
|
+
"MessageUID",
|
|
111
|
+
"PluginCoreRPC",
|
|
112
|
+
"PluginEnvRPC",
|
|
113
|
+
"PluginLifeCycleRPC",
|
|
114
|
+
"PluginRPC",
|
|
115
|
+
"PluginTopicRPC",
|
|
116
|
+
"PluginWorker",
|
|
117
|
+
"IpcEventCuda",
|
|
118
|
+
"IpcEventPool",
|
|
119
|
+
"IpcEventPoolManaged",
|
|
120
|
+
"mark_graph_output",
|
|
121
|
+
"sanitize_for_ipc",
|
|
122
|
+
]
|
|
@@ -13,12 +13,12 @@ import torch.multiprocessing as mp
|
|
|
13
13
|
import time
|
|
14
14
|
from typing import Any, Dict, List, Optional
|
|
15
15
|
|
|
16
|
-
from parallelazy.utils
|
|
17
|
-
from parallelazy.plugin
|
|
18
|
-
from parallelazy.
|
|
19
|
-
from parallelazy.
|
|
20
|
-
from parallelazy.
|
|
21
|
-
from parallelazy.
|
|
16
|
+
from parallelazy.utils import process_start_spawn
|
|
17
|
+
from parallelazy.plugin import PluginDescriptor
|
|
18
|
+
from parallelazy.plugin_rpc import PluginRPC, RequestEnvGetAll, RequestEnvUnsubscribe, RequestTopicAnnounce
|
|
19
|
+
from parallelazy.plugin_worker import PluginWorker, Queue, RequestPluginCall, RequestTopicSubscribe, RequestTopicUnsubscribe
|
|
20
|
+
from parallelazy.plugin_data import CommandType, ProcessStatus, RequestEnvGet, RequestEnvSet, RequestEnvSubscribe, PluginStatus, Subscriber
|
|
21
|
+
from parallelazy.environment_manager import EnvironmentManager
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
@@ -8,8 +8,8 @@ from torch import multiprocessing as mp
|
|
|
8
8
|
import threading
|
|
9
9
|
from concurrent.futures import ThreadPoolExecutor
|
|
10
10
|
from multiprocessing.connection import wait
|
|
11
|
-
from parallelazy.
|
|
12
|
-
from parallelazy.
|
|
11
|
+
from parallelazy.plugin_data import Channel, CommandType, Message, PendingRequest, Queue, Request, RequestCallback, RequestEnvGet, RequestEnvGetAll, RequestEnvSet, RequestEnvSubscribe, RequestEnvUnsubscribe, RequestEnvUpdate, RequestPluginCall, RequestPluginErrors, RequestPluginStart, RequestPluginStatus, RequestPluginStatusAll, RequestPluginStop, RequestTopicAnnounce, RequestTopicList, RequestTopicSubscribe, RequestTopicUnsubscribe, Response, Subscriber
|
|
12
|
+
from parallelazy.plugin_transport import sanitize_for_ipc
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
@@ -18,11 +18,11 @@ import threading
|
|
|
18
18
|
import time
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from parallelazy.utils
|
|
22
|
-
from parallelazy.
|
|
23
|
-
from parallelazy.plugin
|
|
21
|
+
from parallelazy.utils import init_debugger, process_start_spawn
|
|
22
|
+
from parallelazy.plugin_data import Channel, CommandType, Queue,QueueDescriptor, PendingRequest, PluginStatus, RequestPluginErrors, RequestPluginStart, RequestPluginStatus, RequestPluginStop, RequestTopicList, Subscriber, Subscription
|
|
23
|
+
from parallelazy.plugin import Plugin, PluginDescriptor, PluginState
|
|
24
24
|
|
|
25
|
-
from parallelazy.
|
|
25
|
+
from parallelazy.plugin_rpc import PluginRPC, RequestEnvUpdate, RequestPluginCall, RequestTopicList, RequestTopicSubscribe, RequestTopicUnsubscribe, sanitize_for_ipc
|
|
26
26
|
from multiprocessing.synchronize import Event
|
|
27
27
|
|
|
28
28
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: parallelazy
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: A lightweight multiprocess worker-plugin framework. Topic-based pub/sub, global enviroment, using process spawn and pipes, pytorch and CUDA ready.
|
|
5
|
+
Author: Cesare Montresor
|
|
6
|
+
Project-URL: Homepage, https://github.com/cesare-montresor/parallelazy
|
|
7
|
+
Project-URL: Repository, https://github.com/cesare-montresor/parallelazy
|
|
8
|
+
Project-URL: Issues, https://github.com/cesare-montresor/parallelazy/issues
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: debugpy
|
|
13
|
+
Requires-Dist: torch
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# parallelazy
|
|
17
|
+
|
|
18
|
+
A lightweight Python plugin/worker framework with:
|
|
19
|
+
|
|
20
|
+
- isolated plugin processes started with `spawn`;
|
|
21
|
+
- topic-based publish/subscribe;
|
|
22
|
+
- shared environment values and change notifications;
|
|
23
|
+
- plugin-to-plugin RPC; and
|
|
24
|
+
- PyTorch/CUDA-aware multiprocessing support.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
python -m pip install .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import time
|
|
36
|
+
|
|
37
|
+
from parallelazy.plugin import Plugin
|
|
38
|
+
from parallelazy.plugin_manager import PluginManager
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Worker(Plugin):
|
|
42
|
+
def on_start(self):
|
|
43
|
+
self.env_set("worker.ready", True)
|
|
44
|
+
|
|
45
|
+
def main(self):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def main():
|
|
50
|
+
manager = PluginManager()
|
|
51
|
+
descriptor = Worker.Descriptor(
|
|
52
|
+
version="1.0.0",
|
|
53
|
+
author="Application team",
|
|
54
|
+
description="Example worker",
|
|
55
|
+
)
|
|
56
|
+
if not manager.load_plugin(descriptor):
|
|
57
|
+
raise RuntimeError("Plugin failed to load")
|
|
58
|
+
if not manager.start_plugin(descriptor.name):
|
|
59
|
+
raise RuntimeError("Plugin failed to start")
|
|
60
|
+
try:
|
|
61
|
+
time.sleep(0.1)
|
|
62
|
+
print(manager.env_get("worker.ready"))
|
|
63
|
+
finally:
|
|
64
|
+
manager.unload_plugin(descriptor.name)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if __name__ == "__main__":
|
|
68
|
+
main()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
Read the [documentation index](docs/index.md) for installation, concepts,
|
|
74
|
+
API reference, usage patterns, and troubleshooting.
|
|
75
|
+
|
|
76
|
+
The complete runnable examples are in
|
|
77
|
+
[examples/](examples/). For example:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
python -m examples.example_pubsub
|
|
81
|
+
python -m examples.example_rpc_calls
|
|
82
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
parallelazy/__init__.py
|
|
5
|
+
parallelazy/environment_manager.py
|
|
6
|
+
parallelazy/plugin.py
|
|
7
|
+
parallelazy/plugin_data.py
|
|
8
|
+
parallelazy/plugin_manager.py
|
|
9
|
+
parallelazy/plugin_rpc.py
|
|
10
|
+
parallelazy/plugin_transport.py
|
|
11
|
+
parallelazy/plugin_worker.py
|
|
12
|
+
parallelazy/utils.py
|
|
13
|
+
parallelazy.egg-info/PKG-INFO
|
|
14
|
+
parallelazy.egg-info/SOURCES.txt
|
|
15
|
+
parallelazy.egg-info/dependency_links.txt
|
|
16
|
+
parallelazy.egg-info/requires.txt
|
|
17
|
+
parallelazy.egg-info/top_level.txt
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "parallelazy"
|
|
7
|
-
version = "0.0.
|
|
8
|
-
description = "A lightweight multiprocess worker-plugin framework. Topic-based pub/sub,
|
|
7
|
+
version = "0.0.3"
|
|
8
|
+
description = "A lightweight multiprocess worker-plugin framework. Topic-based pub/sub, global enviroment, using process spawn and pipes, pytorch and CUDA ready."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
11
11
|
authors = [
|
|
@@ -14,6 +14,7 @@ authors = [
|
|
|
14
14
|
|
|
15
15
|
dependencies = [
|
|
16
16
|
"debugpy",
|
|
17
|
+
"torch"
|
|
17
18
|
]
|
|
18
19
|
|
|
19
20
|
|
parallelazy-0.0.1/PKG-INFO
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: parallelazy
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: A lightweight multiprocess worker-plugin framework. Topic-based pub/sub, gloval enviroment, using process spawn and pipes, pytorch and CUDA ready.
|
|
5
|
-
Author: Cesare Montresor
|
|
6
|
-
Project-URL: Homepage, https://github.com/cesare-montresor/parallelazy
|
|
7
|
-
Project-URL: Repository, https://github.com/cesare-montresor/parallelazy
|
|
8
|
-
Project-URL: Issues, https://github.com/cesare-montresor/parallelazy/issues
|
|
9
|
-
Requires-Python: >=3.8
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: debugpy
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
|
-
# parallelazy
|
|
16
|
-
|
|
17
|
-
A python lightweight, plugin/worker framework, with topic-based pub/sub and shared env using spawn and pipes, pytorch and CUDA ready.
|
parallelazy-0.0.1/README.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
ModularNet Plugin System: Lightweight multiprocessing-based plugin architecture.
|
|
3
|
-
|
|
4
|
-
Provides modular plugin execution with pub/sub messaging, environment variables,
|
|
5
|
-
and service invocation.
|
|
6
|
-
|
|
7
|
-
Main Components:
|
|
8
|
-
- PluginDescriptor: Serializable plugin metadata
|
|
9
|
-
- Plugin: Abstract base class for plugins
|
|
10
|
-
- PluginManager: Plugin orchestration and management
|
|
11
|
-
- PluginWorker: Plugin subprocess worker
|
|
12
|
-
- PluginMessages: Unified IPC message protocol (Request, Response)
|
|
13
|
-
- DataExchange: Unified subscription model (topics + env vars)
|
|
14
|
-
- ManagerProxy: Client-side proxy for direct manager access from plugins
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from parallelazy.plugin import Plugin, PluginState, PluginDescriptor
|
|
18
|
-
from parallelazy.environment_manager import EnvironmentManager
|
|
19
|
-
from parallelazy.plugin_manager import PluginManager
|
|
20
|
-
|
|
21
|
-
from parallelazy.plugin_data import (
|
|
22
|
-
Request, Response,
|
|
23
|
-
Subscription,
|
|
24
|
-
PluginStatus, ProcessStatus
|
|
25
|
-
)
|
|
26
|
-
from parallelazy.plugin_rpc import PluginRPC
|
|
27
|
-
|
|
28
|
-
__all__ = [
|
|
29
|
-
"PluginDescriptor",
|
|
30
|
-
"Plugin",
|
|
31
|
-
"PluginState",
|
|
32
|
-
"EnvironmentManager",
|
|
33
|
-
"EnvUpdate",
|
|
34
|
-
"PluginManager",
|
|
35
|
-
"Request",
|
|
36
|
-
"Response",
|
|
37
|
-
"Channel",
|
|
38
|
-
"Subscription",
|
|
39
|
-
"SubscriptionType",
|
|
40
|
-
"PluginStatus",
|
|
41
|
-
"ProcessStatus",
|
|
42
|
-
"PluginRPC",
|
|
43
|
-
]
|
|
File without changes
|