Waldorf is an efficient, parallel task execution framework written in Python. It was developed for research into reinforcement learning algorithms at our startup company in Beijing, China.
Waldorf is based on the Celery distributed task queue, and takes its name from Waldorf salad, which also has celery as an ingredient.
It can speed up algorithms such as Monte Carlo Tree Search (MCTS) by spreading concurrent sub-tasks, written as Python functions, across multiple machines and automating the collection of outputs. Waldorf can also be used to implement MapReduce-style work-flows.
Although Waldorf can be deployed on cloud servers, our emphasis at the moment is on utilizing the spare CPU capacity of a commodity PC cluster (e.g. normal office workstations). Support for GPUs may be included in a future release.
Features
-
Waldorf uses a master node to pass messages between a client and slave nodes.
-
A client can create a task as a Python function on his or her local machine. Waldorf sends tasks to a network of slave machines for execution using the Celery task queue. When Celery is used on its own, tasks typically must be defined in advance, but Waldorf allows tasks to be defined dynamically without any slave restarts required.
-
Multiple clients can run their tasks simultaneously without conflict.
-
Clients can adjust how many CPU cores are used on slave machines to perform calculations. This can be done dynamically from the Waldorf administration webpage.
Basic Usage
You can use Waldorf on any task that requires parallel computing.
One of its many uses is to compute rollouts in an MCTS simulation (for example, in game-playing AIs).
Here is a simple illustration:
def rollout(args):
# Do one rollout
...
def backup(result):
# Backup and handle result
...
def mcts_search():
for _ in range(iter):
# Select action
action = select()
...
# Submit rollout job to waldorf client
client.submit(rollout, args, callback=backup)
...
# More code
...
For a more complex example, check out the gym demo.
Quick Start
Install Waldorf using the installation guide and check out the gym demo.
Disclaimer
Waldorf is still research code, so it may be slightly lacking in terms of documentation and support. Any feedback is welcomed.
Metadata
Release files for waldorf 0.6.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| waldorf-0.6.0.post1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / waldorf-0.6.0.post1-py3-none-any.whl
| Download URL | waldorf-0.6.0.post1-py3-none-any.whl |
|---|---|
| Size | 219.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58ae08b9922f931875437d24f5eb677f0a4cac9f75cc0ec1c305887682844c22
|
|
BLAKE2b-256 checksum How to use checksums |
3aa175896b08b74765c7d2038edad2659c9bdc337f54f2debbccbedbfa0b46dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for waldorf 0.6.0.post1
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.