PyTaskFarmer
This is a small project of a Python TaskFarmer for running jobs at NERSC's Cori (though it should be flexible to run on other systems). It is very loosely based on the concept of Shane Canon's TaskFarmer.
Usage
The executable script is:
usage: pytaskfarmer.py [-h] [--proc [Processes]] [--timeout TIMEOUT]
[--workdir WORKDIR] [--verbose VERB]
[--runner RUNNER] [--tasklist TASKLISTHANDLER]
tasklist
The tasklist argument is a simple text file with one task per line. The
interpretation of the task is up to the TASKLISTHANDLER. By default, the task
is treated as a command to run. It is not important how complex the command is.
The --verbose flag adds a bit more output (though not much) telling you what
the script is doing as it runs (default False).
The --timeout option allows you to set a timeout for the script, so that after
some number of seconds the tasks will be automatically killed (default none).
The --proc option tells the script how many parallel workers to create
(default8).
The --workdir option tells the script where to store the progress (task
status, log files..) of a single run (default is tasklist_workdir).
The --runner options indicates which runner to execute the command with. See
the dedicated section on the available runners and how they work.
The --tasklist options indicates which tasklist handler to parse the tasklist
with. See the dedicated section on the available runners and how they work.
What it does (60 second version)
The basic behavior, with the default runner/handler, is as follows. Each access to a file is protected using a file locking mechanism.
-
The tasklist is read and a
toprocessfile is created in theworkdirwith unprocessed tasks. -
A number of workers (
multiprocessing.Pool) are constructed to run on the tasks. -
When some work is done, the command is placed into a
finishedorfailedfiles, depending on the status code. -
Duration and start times of completed tasks (timeline) are saved into a
timeline.jsonfile. This can then be opened with Perfetto. -
The tasks are processed by the workers until 1) the work is completed; 2) the timeout is reached; or 3) a signal is intercepted.
Metadata
Release files for PyTaskFarmer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyTaskFarmer-0.1.0.tar.gz | 12.0 kB | Without provenance | Details for PyTaskFarmer-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PyTaskFarmer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for PyTaskFarmer-0.1.0-py3-none-any.whl |
Total release size: 25.9 kB
Release files / PyTaskFarmer-0.1.0.tar.gz
| Download URL | PyTaskFarmer-0.1.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a52c211cc0c3e0e00a89c6230e6cf7e574501a4fe7421a4adf1b19d09a8a28dd
|
|
BLAKE2b-256 checksum How to use checksums |
befe08dff34f40340abb406fa81365fd00938aa35ddb059fcde237c4027eb6f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / PyTaskFarmer-0.1.0-py3-none-any.whl
| Download URL | PyTaskFarmer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f865e1412ec5326ef4c0cd9911cacc842331e10fa5cc0e1719ae9a5a17f05e6f
|
|
BLAKE2b-256 checksum How to use checksums |
6ebdad88b1105008e9ad3b8f39095e85202db27a765d26d22963c97e069b293f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for PyTaskFarmer 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.