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
Hashes for parallel_manager-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb20c6b28cddf11a182f257e700340cf2efe4afb9059900afd7690a9524b8ff2 |
|
MD5 | 6e0d17ffce08a2bbcbb62a93f001246f |
|
BLAKE2b-256 | 09b533a960fe5b01dd394f31c78b3f474721a546569e273176a70468881a4c4f |