A simple shell command manager. Used for running parallel simulations.
Project description
parallel_manager
A simple shell command manager. Used for running parallel simulations.
Structure
Separate coroutine from init methods
- Worker
- Receive request from queue and process it
- Could have FunctionWorker or ShellWorker?
- WorkerGroup
- Manage workers of same class
- Collect basic stats from workers
- Manager?
-
Might host various workergroups with different worker type
-
Support various ways to add tasks
-
Also to get current status/monitoring
-
Control workergroups/workers
-
Various middleware/plugin to the BaseManager to implement other features like http web monitoring and task submission
-
Has a dedicated async.Runner to host the event loop in this Manager?
-
non-blocking mode (make this a subclass of BaseManager)
- I would like to init the manager with asyncio.run
- then could add request to it in synchronous code
- Something like
# Async part asyncio.run(simpleShellManager.init(), debug=True) # Sync part for i in range(10): print(i) simpleShellManager.add_shell_request(f"echoing loop2-{i}", f"echo {i}")
- Update, this is impossible with single threaded program as when .run() finishes, the loop is closed.
- Need two threads for this, one for managing the workers, one to submit
-
BaseManager
- Need to have a event loop attribute
- BaseManager will need to be wrapped in a coroutine.
-
TODO
-
Request and Response queue for worker
-
Request and Response class design
-
[] Dump failed cmd to a file
-
[] Slurm rerun task
-
[] Task complete statistics? Worker timed the run time for each cmd executed and plot it at the end or when killed?
-
[] atexit function, dump remaining tasks currently in the queue
-
[] Progress indicator for each task when logging?
-
[] Interactive control for status monitoring and changing configuration dynamically, treat worker as a server that can submit task to, like a local slurm control
-
[] decouple worker and job pushing
-
[] support launching together in a script or subscribe to the worker server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file parallel_manager-0.0.2.tar.gz
.
File metadata
- Download URL: parallel_manager-0.0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b8379d66b851438d52ad6a6e137dc5c43865f556d68222fef4b9cb1b2d9e2f8 |
|
MD5 | f3a365a4917900d5c7581cccb06a9daf |
|
BLAKE2b-256 | 1c0f96cb3a8446563fd0b6ffffed9405be5a3810c603f8e428580daf845aa387 |
File details
Details for the file parallel_manager-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: parallel_manager-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5ce6fb286dcdc59bc522057e3adf5595f51db2b9e89c24286605dd24cf7e355 |
|
MD5 | eb3e0fd4426712a5816f83b65ffcf037 |
|
BLAKE2b-256 | 8213415284315dc6d06d534cab228348c7df12b47865b1a2fde2e675139bd2a0 |