Skip to main content

ictasks

ictasks is a library to support running collections of small tasks in parallel, from a laptop through to a HPC cluster.

It is being developed to support projects and workflow standarisation at the Irish Centre for High End Computing (ICHEC).

There are many libraries like this, this one focuses on:

  • being small and simple - easy for ICHEC researchers to understand all elements of it
  • having low dependencies - can be installed with pip
  • having an easy to use configuration format with yaml
  • having verbose and structured reporting of task related metadata for analysis

Features

The library allows a few different ways to specify tasks.

  1. As a Python package

You can create a collection of Task instances and launch them with the session.run() function.

  1. Using a tasklist.dat file and the command line interface (CLI):
ictasks taskfarm --tasklist $PATH_TO_TASKLIST

See the test/data/tasklist.dat file for an example input with two small tasks.

  1. Using a yaml config file, giving task and environment info.
job_id: my_job
task_distribution:
    cores_per_node: 1

tasks:
    items:
    - id: 0
      launch_cmd: "echo 'hello from task 0'"
    - id: 1
      launch_cmd: "echo 'hello from task 1'"

we can run this with:

ictasks taskfarm --config my_config.yaml

Launching the run will launch the task in that directory and output a status file task.json. By default all processors on the machine (or compute node) will be assigned tasks.

task_distribution

There are 5 variables available in task_distribution

  • cores_per_node=0
  • threads_per_core=0
  • cores_per_task=1
  • gpus_per_node=0
  • gpus_per_task=0

If left unspecified, both cores_per_task and gpus_per_task will be automatically detected and set.

The number of active workers will be set depending on these resource limitations, with gpu limits being hit first if needed. These workers can then execute tasks in parallel.

gpus in your tasks

When taskfarming with gpus, there will be a gpu_ids.txt file in each task directory which contains a gpu_id per line, the user's program must then use this file to specify which gpu(s) to use. The function ictasks.task.get_gpu_ids can be used to retrieve the ids in this file as a Python list. See an example here.

Installing

The package can be installed from PyPI:

pip install ictasks

Contact

Our Gitlab hosting arrangement doesn't allow us to easily accept external contributions or feedback, however they are still welcome.

In future if there is interest

If you have any feedback on this library

License

This package is Coypright of the Irish Centre for High End Computing. It can be used under the terms of the GNU Public License (GPL v3+). See the included LICENSE.txt file for details.

If you are an ICHEC collaborator or user of the National Service different licensing terms can be offered - please get in touch to discuss.

Release files for ictasks 0.2.4

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

Source distribution (sdist)

Source distribution for ictasks 0.2.4
File Size Uploaded
ictasks-0.2.4.tar.gz 28.7 kB Details

Built distribution (wheel)

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

Total release size: 59.1 kB

Release files / ictasks-0.2.4.tar.gz

Download URL ictasks-0.2.4.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2f771fc55fc5a6a56835e1181ede6e7d9967f7f58d5ffbdc6debc7f0e11c7aec
BLAKE2b-256 checksum
How to use checksums
0ab36dcbca9751b75f665df784c18368c3e055caff9ec568489a38c444b3bde1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / ictasks-0.2.4-py3-none-any.whl

Download URL ictasks-0.2.4-py3-none-any.whl
Size 30.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8eff08754c5a2ec2668ae959e6c4277cf528478871b692a5e1567bd6526ed7c
BLAKE2b-256 checksum
How to use checksums
83ec67c278152a40fdf48c42db655e8cb2982d93c7554c50d3d09033d27c76fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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