Skip to main content

Taku: Task managing made easy

Project description

Taku

Taku is a library for easy manipulating pipelined-tasks. It manages intermediate caching, job depedencies, provide a easy interface to parallel jobs using multiple backends. Also, it supports direct instantiation of a torch Dataset, allowing for end-to-end data generation & training experience.

Caveat: Tasklib is only beta now, and for now only supports chained dependency (but one/multiple job in a task can be dependent on multiple/one jobs in another task).

Example Task Class

from pathlib import Path
from typing import Any, List, Optional
import taku
from taku.task import JobData, JobName, JobSpecs, TaskName


class ExampleTask(taku.Task):
    def __init__(self, name: TaskName, hparams: Any, meta_override_dir: Path | None = None) -> None:
        super().__init__(name, hparams, meta_override_dir)

    def gather_jobs(self, upstream_job_names: List[JobName]) -> List[JobSpecs]:
        return super().gather_jobs(upstream_job_names)
    
    def run(self, job_name: JobName, job_data: JobData, upstream_job_names: List[str], upstream_job_data: List[JobData]) -> JobData:
        return super().run(job_name, job_data, upstream_job_names, upstream_job_data)
    
    def has_job_data(self, job_name: str) -> bool:
        return super().has_job_data(job_name)
    
    def save_job_data(self, job_name: str, job_data: JobData) -> None:
        return super().save_job_data(job_name, job_data)
    
    def load_job_data(self, job_name: str) -> JobData:
        return super().load_job_data(job_name)

Development

# Develop locally
python setup.py develop
# Update to PyPI
bash bump_and_upload.sh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taku-0.7.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

taku-0.7.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file taku-0.7.0.tar.gz.

File metadata

  • Download URL: taku-0.7.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for taku-0.7.0.tar.gz
Algorithm Hash digest
SHA256 bd17e3da884ffef7e056a10a1dba81e6069781eafb5d16894fad18ca4d19c6cc
MD5 b446ac61d118ae10ade7430bdcdeb452
BLAKE2b-256 2e2036e650f98db102f0651cd6b6b5684b06fd87462c468cd6c727fa17dfd5ee

See more details on using hashes here.

File details

Details for the file taku-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: taku-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for taku-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52ea4d16a6c03b46217dd1091bf26f80c58db4efbe6d47e23d6e0574172ec01d
MD5 42c648fa408f9698abc35205a2d0856d
BLAKE2b-256 159ae2cf618be6eefbe276f420923fac6f319cc802962381679c0618a073b21b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page