Skip to main content

Pypi PypiDownloads GitlabCIPipeline GitlabCICoverage ReadTheDocs

Read the Docs

http://kwdagger.readthedocs.io/en/latest/

Gitlab (main)

https://gitlab.kitware.com/computer-vision/kwdagger

Github (mirror)

https://github.com/Kitware/kwdagger

Pypi

https://pypi.org/project/kwdagger

Overview

KWDagger turns parameterized definitions of existing command-line programs into static, inspectable graphs of shell commands and hashed result directories. It builds on cmd_queue and kwconf to provide:

  • Reusable kwdagger.pipeline.Pipeline and kwdagger.pipeline.ProcessNode abstractions for constructing commands and wiring produced artifacts.

  • Parameter-matrix expansion with operational deduplication of equivalent requested work.

  • Per-process invoke.sh files and a navigable .pred / .succ symlink graph, so generated work can be inspected, rerun, or invalidated without remaining inside the kwdagger runtime.

  • A scheduling CLI (kwdagger.schedule) that hands the static command graph to serial, tmux, or Slurm cmd_queue backends. The tmux backend is the most commonly used interactive runner.

  • An optional aggregation CLI (kwdagger.aggregate) that loads completed results, requested and resolved parameters, and metrics into analytical tables and reports.

  • A self-contained demo pipeline in kwdagger.demo.demodata that is used in CI and serves as a reference implementation.

Kwdagger wraps ordinary scripts rather than replacing them. A node may use the default named-argument command convention or subclass ProcessNode to support an existing positional or otherwise specialized CLI.

Repository layout

  • kwdagger/pipeline/ – core pipeline and process node definitions, networkx graph construction, and configuration utilities. Import from kwdagger.pipeline; the submodules inside it are private.

  • kwdagger/schedule.pyScheduleEvaluationConfig CLI for expanding parameter grids into runnable jobs and dispatching them through cmd_queue backends.

  • kwdagger/aggregate.pyAggregateEvaluationConfig CLI for loading job outputs, computing parameter hash IDs, and generating text/plot reports.

  • kwdagger/demo/demodata.py – end-to-end demo pipeline with prediction and evaluation stages plus CLI entry points for each node.

  • docs/ – Sphinx sources, including an example user module under docs/source/manual/tutorials/twostage_pipeline.

  • tests/ – unit and functional coverage for pipeline wiring, scheduler behavior, aggregation, and import sanity checks.

Quickstart

Run the demo pipeline locally to see the CLI workflow end-to-end:

TMP_DPATH=$(mktemp -d --suffix "-kwdagger-demo")
cd "$TMP_DPATH"
echo "demo" > input.txt

EVAL_DPATH=$PWD/pipeline_output
python -m kwdagger.schedule \
    --params="
        pipeline: 'kwdagger.demo.demodata.my_demo_pipeline()'
        matrix:
            stage1_predict.src_fpath:
                - input.txt
            stage1_predict.param1:
                - 123
            stage1_evaluate.workers: 2
    " \
    --root_dpath="${EVAL_DPATH}" \
    --backend=serial --skip_existing=1 --run=1

python -m kwdagger.aggregate \
    --pipeline='kwdagger.demo.demodata.my_demo_pipeline()' \
    --target "
        - $EVAL_DPATH
    " \
    --output_dpath="$EVAL_DPATH/full_aggregate" \
    --eval_nodes="
        - stage1_evaluate
    " \
    --stdout_report="
        top_k: 10
        concise: 1
    "

The scheduler generates per-node job directories with invoke.sh and job_config.json metadata. Each invoke.sh is intended to be a usable recomputation command even when kwdagger is not involved in the rerun. The aggregator is then one optional way to consolidate results and print a report.

The hashed result tree contains a graph-based symlink structure for navigating produced-artifact dependencies. The .succ folder links to results that depend on the current result, and .pred links to results consumed by the current process. This makes downstream inspection and invalidation possible after the original scheduling command has finished.

For more in-depth information see tutorials:

Command line entry points

  • python -m kwdagger.schedule or kwdagger schedule – build and run a pipeline over a parameter matrix (see kwdagger.schedule.ScheduleEvaluationConfig).

  • python -m kwdagger.aggregate or kwdagger aggregate – load completed runs and generate tabular and plotted summaries (kwdagger.aggregate.AggregateEvaluationConfig).

  • python -m kwdagger – modal CLI that exposes the schedule and aggregate commands via kwdagger.__main__.KWDaggerModal.

Download files

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

Source Distribution

kwdagger-0.4.0.tar.gz (292.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kwdagger-0.4.0-py3-none-any.whl (214.1 kB view details)

Uploaded Python 3

File details

Details for the file kwdagger-0.4.0.tar.gz.

File metadata

  • Download URL: kwdagger-0.4.0.tar.gz
  • Upload date:
  • Size: 292.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for kwdagger-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e0b0ac6fb8f0ea5c56505541e2c62ccdfe15149e47b845dff6b588eee8e410d8
MD5 caae63a3f5d4f5a8fcb6dbf8f7bcf5ce
BLAKE2b-256 cffffda99f3d2007c40a9893737edf650cb6769ab3efd89412070ffdabe21160

See more details on using hashes here.

File details

Details for the file kwdagger-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: kwdagger-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 214.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for kwdagger-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0213142a5f0343d06f6e6c6b27bac6252a7b83d6afb1f232dda0ca1bab69ba85
MD5 e20aafedb3c8f11098fbd1f0a42d9d8f
BLAKE2b-256 d22bc5a73d4abbe9a9e63bc7ac5b4ad18225188a42421f2b5101f05cb7ee5d88

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 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