Metadata-Version: 2.4
Name: labtasker
Version: 0.2.8
Summary: A task queue system for lab experiments
Author-email: Your Name <your.email@example.com>
License: Apache License 2.0
Project-URL: Homepage, https://github.com/luocfprime/labtasker
Project-URL: Documentation, https://luocfprime.github.io/labtasker
Project-URL: Repository, https://github.com/luocfprime/labtasker.git
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pymongo<5.0.0,>=4.0.0
Requires-Dist: fastapi<0.117.0,>=0.115.0
Requires-Dist: uvicorn[standard]<0.36.0,>=0.15.0
Requires-Dist: click<9.0.0,>=8.2.0
Requires-Dist: passlib<2.0.0,>=1.7.0
Requires-Dist: pydantic-settings<3.0.0,>=2.8.0
Requires-Dist: httpx[socks]<0.29.0,>=0.28.0
Requires-Dist: typer<0.17.0,>=0.16.0
Requires-Dist: loguru<0.8.0,>=0.7.0
Requires-Dist: ruamel-yaml<0.19.0,>=0.18.10
Requires-Dist: pyyaml<7.0.0,>=6.0.0
Requires-Dist: tomlkit<0.14.0,>=0.13.2
Requires-Dist: importlib-metadata<9.0.0,>=8.5.0
Requires-Dist: packaging<26.0,>=24.2
Requires-Dist: sse-starlette<3.0.0,>=2.1.3
Requires-Dist: httpx-sse<0.5.0,>=0.4.0
Requires-Dist: stamina<26.0.0,>=25.1.0
Requires-Dist: noneprompt<0.2.0,>=0.1.9
Requires-Dist: mongomock<4.4.0,>=4.3.0
Requires-Dist: jsonpickle<5.0.0,>=4.0.2
Requires-Dist: mslex<2.0.0,>=1.3.0
Requires-Dist: pexpect<5.0.0,>=4.9.0
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov<7.0.0,>=5.0.0; extra == "dev"
Requires-Dist: black<26.0.0,>=24.0.0; extra == "dev"
Requires-Dist: isort<7.0.0,>=5.13.0; extra == "dev"
Requires-Dist: mypy<2.0.0,>=1.14.0; extra == "dev"
Requires-Dist: flake8<8.0.0,>=7.0.0; extra == "dev"
Requires-Dist: pre-commit<5.0.0,>=3.0.0; extra == "dev"
Requires-Dist: freezegun<2.0.0,>=1.5.0; extra == "dev"
Requires-Dist: pytest-docker<4.0.0,>=3.0.0; extra == "dev"
Requires-Dist: pytest-asyncio<1.1.0,>=0.24.0; extra == "dev"
Requires-Dist: asgi-lifespan<3.0.0,>=2.1.0; extra == "dev"
Requires-Dist: tox<4.28.0,>=4.24.0; extra == "dev"
Requires-Dist: pytest-dependency<0.7.0,>=0.6.0; extra == "dev"
Requires-Dist: pytest-sugar<2.0.0,>=1.0.0; extra == "dev"
Provides-Extra: doc
Requires-Dist: mkdocs-material<9.7.0,>=9.6.5; extra == "doc"
Requires-Dist: mkdocs-glightbox<0.5.0,>=0.4.0; extra == "doc"
Requires-Dist: mike<2.2.0,>=2.1.3; extra == "doc"
Provides-Extra: plugins
Requires-Dist: labtasker-plugin-task-count; extra == "plugins"
Requires-Dist: labtasker-plugin-script-generate; extra == "plugins"
Dynamic: license-file

<p align="center"><em>Make your ML experiment wrapper scripts smarter with...</em></p>
<h1 align="center" style="font-size: 40px;"> <a href="">Labtasker</a></h1>
<p align="center"><a href="https://luocfprime.github.io/labtasker/latest/install/install/">Install</a> • <a href="https://luocfprime.github.io/labtasker/latest/guide/basic/">Tutorial / Demo</a> • <a href="https://luocfprime.github.io/labtasker/latest/">Documentation</a> • <a href="https://luocfprime.github.io/labtasker/latest/faq/">FAQs</a> • <a href="https://github.com/luocfprime/labtasker/releases">Releases</a></p>

<p align="center">
  <img src="https://github.com/luocfprime/labtasker/actions/workflows/unit-test-matrix.yml/badge.svg" alt="unit-test-matrix" />
  <a href="https://codecov.io/gh/luocfprime/labtasker"><img src="https://codecov.io/gh/luocfprime/labtasker/graph/badge.svg?token=KQFBV3QRPY" alt="codecov" /></a>
  <img src="https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue" alt="Python version" />
  <a href="https://pypi.org/project/labtasker/"><img src="https://img.shields.io/pypi/v/labtasker" alt="PyPI" /></a>
</p>


**<span style="font-size: 20px;"> 🌟 Labtasker makes ML experiment wrapper scripts smarter with task prioritization,
failure handling, halfway resume and more: just change 1 line of code.</span>**

If you like our project, please give us a star ⭐ on GitHub for latest update.

## ✨ When and Where to Use

**TLDR**: Replace `for` loops in your experiment *wrapper script* with labtasker to enable features like experiment
parallelization, dynamic task prioritization, failure handling, halfway resume, and more.

![comparison](docs/docs/assets/comparison.png)

🐳 For detailed examples and concepts, check out the [documentation](https://luocfprime.github.io/labtasker/).

## 🧪️ A Quick Demo

This demo shows how to easily submit task arguments and run jobs in parallel.

It also features an event listener to monitor task execution in real-time and automate workflows,
such as sending emails on task failure.

![demo](docs/docs/assets/gifs/demo.gif)

For more detailed steps, please refer to the content in
the [Tutorial / Demo](https://luocfprime.github.io/labtasker/latest/guide/basic/).

## ⚡️ Features

- ⚙️ Easy configuration and setup.
- 🧩 Versatile and minimalistic design.
- 🔄 Supports both CLI and Python API for task scheduling.
- 🔌 Customizable plugin system.

## 🔮 Supercharge Your ML Experiments with Labtasker

- ⚡️ **Effortless Parallelization:** Distribute tasks across multiple GPU workers with just a few lines of code.
- 🛡️ **Intelligent Failure Management:** Automatically capture exceptions, retry failed tasks, and maintain detailed
  error logs.
- 🔄 **Seamless Recovery:** Resume failed experiments with a single command - no more scavenging through logs or
  directories.
- 🎯 **Real-time Prioritization:** Changed your mind about experiment settings? Instantly cancel, add, or reschedule
  tasks without disrupting existing ones.
- 🤖 **Workflow Automation:** Set up smart event triggers for email notifications or task workflow based on FSM
  transition events.
- 📊 **Streamlined Logging:** All stdout/stderr automatically organized in `.labtasker/logs` - zero configuration
  required.
- 🧩 **Extensible Plugin System:** Create custom command combinations or leverage community plugins to extend
  functionality.

## 🛠️ Installation

> [!NOTE]
> You need a running Labtasker server to use the client tools.
> Simply use the installed Python CLI `labtasker-server serve` or use docker-compose to deploy the server.
> See [deployment instructions](https://luocfprime.github.io/labtasker/latest/install/deployment/).

### 1. Install via PyPI

```bash
# Install with optional bundled plugins
pip install 'labtasker[plugins]'
```

### 2. Install the Latest Version from GitHub

```bash
pip install git+https://github.com/luocfprime/labtasker.git
```

## 🚀 Quick Start

Use the following command to launch a labtasker server in the background:

```bash
labtasker-server serve &
```

Use the following command to quickly setup a labtasker queue for your project:

```bash
labtasker init
```

Then, use `labtasker submit` to submit tasks and use `labtasker loop` to run tasks across any number of workers.

> [!TIP]
> If you think manually writing 2 scripts for submit and run is laborious, you can checkout the [labtasker-plugin-script-generate](https://github.com/luocfprime/labtasker-plugin-script-generate).
> It automatically generate 2 scripts based on the script you provided.

## 📚 Documentation

For detailed information on demo, tutorial, deployment, usage, please refer to
the [documentation](https://luocfprime.github.io/labtasker/).

## 🔒 License

See [LICENSE](LICENSE) for details.
