Snakemake executor plugin: ihep

https://img.shields.io/badge/repository-unknown-blue?color=%23022c22 PyPI - Version PyPI - License Snakemake

Warning

No repository URL found in Pypi metadata. The plugin should specify a repository URL in its pyproject.toml (key 'repository'). It is unclear whether the plugin is maintained and reviewed by the official Snakemake organization (https://github.com/snakemake).

Installation

Install this plugin by installing it with pip or mamba directly, e.g.:

pip install snakemake-executor-plugin-ihep

Or, if you are using pixi, add the plugin to your pixi.toml. Be careful to put it under the right dependency type based on the plugin’s availability, e.g.:

snakemake-executor-plugin-ihep = "*"

Usage

In order to use the plugin, run Snakemake (>=8.6) in the folder where your workflow code and config resides (containing either workflow/Snakefile or Snakefile) with the corresponding value for the executor flag:

snakemake --executor ihep --default-resources --jobs N ...

with N being the number of jobs you want to run in parallel and ... being any additional arguments you want to use (see below). The machine on which you run Snakemake must have the executor plugin installed, and, depending on the type of the executor plugin, have access to the target service of the executor plugin (e.g. an HPC middleware like slurm with the sbatch command, or internet access to submit jobs to some cloud provider, e.g. azure).

The flag --default-resources ensures that Snakemake auto-calculates the mem and disk resources for each job, based on the input file size. The values assumed there are conservative and should usually suffice. However, you can always override those defaults by specifying the resources in your Snakemake rules or via the --set-resources flag.

Depending on the executor plugin, you might either rely on a shared local filesystem or use a remote filesystem or storage. For the latter, you have to additionally use a suitable storage plugin (see section storage plugins in the sidebar of this catalog) and eventually check for further recommendations in the sections below.

All arguments can also be persisted via a profile, such that they don’t have to be specified on each invocation. Here, this would mean the following entries inside of the profile

executor: ihep
default_resources: []

For specifying other default resources than the built-in ones, see the docs.

Settings

The executor plugin has the following settings (which can be passed via command line, the workflow or environment variables, if provided in the respective columns):

Settings

CLI argument

Description

Default

Choices

Required

Type

--ihep-jobdir VALUE

Directory where the job will create a directory to store log, output and error files.

'.snakemake/htcondor'

--ihep-shared-fs-prefixes VALUE

Comma-separated path prefixes shared between AP and EPs (e.g., ‘/staging,/shared’). Files under these paths are accessed directly without HTCondor transfer. Use with –shared-fs-usage none when only specific paths (not all I/O) are shared.

None

--ihep-held-timeout VALUE

Timeout in seconds for held jobs before the Executor will treat them as failed. This allows time for manual intervention (e.g., condor_release) before the workflow fails. Default is 4 hours (14400 seconds). Set to 0 to fail immediately when a job is held.

14400