Skip to main content

Akasaka

Dynamic mutiprocess preprocessing task loader and dispatcher.

To be brief, akasaka enables you to write a task class and run it in parallel with a simple command. It features

  • Argument parsing through argparse
  • Cache management, i.e. you can override is_executed to check if the task is already executed
  • Automatic parallelization
  • Some helper functions to make your life easier (to be added later)

Install

pip install akasaka

Usage

$ akasaka -H
usage: akasaka [--num_process NUM_PROCESS] [--chunksize CHUNKSIZE] [--devices DEVICES [DEVICES ...]] [-h] [-H] module_path

Dynamically load a Python class from a module.

positional arguments:
  module_path           The module path in the format "module.submodule.ClassName"

optional arguments:
  --num_process NUM_PROCESS
                        Number of processes to use, for normal task (default: number of CPU cores)
  --chunksize CHUNKSIZE
                        Number of tasks to be sent to a worker process at a time, for normal task (default: 1)
  --devices DEVICES [DEVICES ...]
                        The devices to run the task on, for torch task (default: [])
  -h, --help            Show help message for task and exit
  -H, --hel-akasaka     Show Akasaka help message and exit

Write a task class of the subclass of AsakasaTask and implement needed methods. Take a look at the examples in the examples directory.

For PyTorch CUDA tasks, you would need to use AsakasaTorchTask as the base class. The number of processes is determined by the number of CUDA devices provided.

With akasaka installed, to run the examples, try following commands:

cd examples
# print.py
akasaka print.PrintTaskTest --test test_string
# directory_example/print.py
akasaka directory_example.print.PrintTaskTest --test test_string

Development

To install from source, clone the repository and run

pip install -e .

Known Issues

For torch (CUDA) task, you might need to wait for unexpected long time after model loaded before the task can start. Reason to be figured out.

Metadata

Release files for akasaka 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akasaka 0.1.6
File Size Uploaded Provenance
akasaka-0.1.6.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for akasaka 0.1.6
File Interpreter ABI Platform
akasaka-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / akasaka-0.1.6.tar.gz

Download URL akasaka-0.1.6.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7b44a664277af5bc558dc94503f80f3bf07626000219050bc0979fd616145394
BLAKE2b-256 checksum
How to use checksums
5d18072666ee47dc068182f5babb1ae235f92a3bf3536d6c9e5cc31181acedbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / akasaka-0.1.6-py3-none-any.whl

Download URL akasaka-0.1.6-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db5448f9d555dce029f01a32a4b577ac49aaad287081eaff890d286d0fc933d1
BLAKE2b-256 checksum
How to use checksums
9cf711bf84c8f89bf6a7cc7fb0a3230aea58b537dd1f1d3a85f8440e46eae4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Security for akasaka 0.1.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page