Skip to main content

INDW — Instant Data Workflow: corpus ingestion, quality filtering, semantic cleaning, deduplication, and deterministic merge scheduling

Project description

INDW

INDW

INDW (Instant Data Workflow) is an open-source framework for production corpus pipelines. It ingests raw document collections, applies multi-tier quality filtering and semantic cleaning, deduplicates content, and produces deterministic merge output suitable for large-scale model training and evaluation.

INDW is designed for operators who need predictable behavior at scale: the same configuration and input corpus yield the same acceptance decisions and output hash whether you run on a laptop, a multi-core server, or a Dask cluster.

Features

  • Stage0 fast filtering — reject junk, boilerplate, and low-value documents before expensive processing
  • PCI admission gates — tiered quality control with configurable thresholds
  • ACIM artifact discovery — identify and trim structural noise while preserving content
  • LCI routing — intelligence-guided document routing for heavy stages
  • Knowledge extraction — structure recovery and section-aware processing
  • Semantic cleaning — HTML normalization, boilerplate removal, OCR-aware repair
  • Deduplication — exact, fuzzy (MinHash), and semantic (embedding) modes
  • Deterministic merge — strict sequence-ordered apply with hash-verifiable JSONL output
  • Execution backendslocal, thread, multiprocess, dask without changing pipeline logic

Architecture

INDW runs a single canonical execution graph. Documents flow through ingest and Stage0, pass admission tiers, enter parallel heavy stage pools (cleaning, extraction, dedup, quality scoring), and are written by an ordered apply coordinator.

Ingest → Stage0 → Admission → Heavy pools → Apply → Output

Heavy stage logic is backend-agnostic. Worker pools, thread pools, or Dask workers execute the same graph; only the transport layer changes.

INDW architecture

See Architecture overview for capability details.

Installation

pip install -e ".[dev,language]"

With distributed execution support:

pip install -e ".[dev,language,distributed]"

Or use Make:

make install-dev
indw doctor

Full instructions: Installation.

Quick start

Prepare raw JSONL under raw/<source>/data.jsonl, then run:

indw merge ./raw ./out/filtered.jsonl --work-dir ./work --workers 2 --fresh
indw validate

Python API:

from indw.filter.spec.quality import QualityPipelineConfig
from indw.schedule import merge_with_quality

merge_with_quality(
    "./raw", "./out/filtered.jsonl",
    quality_config=QualityPipelineConfig(),
    work_dir="./work",
    workers=2,
    fresh=True,
)

See Quickstart and First pipeline.

CLI

Command Purpose
indw doctor Verify install and dependencies
indw merge Run quality merge on a raw corpus
indw validate Parity and acceptance validation
indw test Run test profiles (unit, parity, critical)
indw audit Operational audit reports
indw benchmark Production scale benchmark
indw merge ./raw ./out/filtered.jsonl --work-dir ./work --workers 4 --backend multiprocess
indw audit --kind production

Reference: CLI commands.

Configuration

INDW accepts YAML quality profiles, environment variables, and Python dataclasses. Example:

import yaml
from pathlib import Path
from indw.filter.spec.quality import QualityPipelineConfig

raw = yaml.safe_load(Path("configs/filtering/quality_fast_first.yaml").read_text())
cfg = QualityPipelineConfig.from_dict(raw)

Key environment variables:

Variable Purpose
INSTANT_PIPELINE_BACKEND local, thread, multiprocess, dask
INSTANT_DASK_SCHEDULER Dask scheduler address
INSTANT_MERGE_HW_PROBE Hardware tuning probe

Precedence: CLI flags override environment; environment overrides YAML defaults.

Details: Configuration.

Pipeline

The merge pipeline is configured through QualityPipelineConfig. Stages include preprocessing, Stage0 content filters, admission tiers, semantic cleaning, knowledge extraction, dedup, and quality gates. Survivors are emitted in document sequence order.

Work directories retain checkpoints for resume, resolved configuration snapshots, and optional audit JSON.

Guide: Filtering · Scheduler

Scaling

Scale horizontally by increasing --workers with the multiprocess backend, or attach a Dask cluster:

export INSTANT_PIPELINE_BACKEND=dask
export DASK_SCHEDULER_ADDRESS=tcp://scheduler:8786
indw merge ./raw ./out/filtered.jsonl --workers 8

Output hash remains stable across worker counts and backends when configuration is unchanged.

Guides: Distributed · Dask · Scaling

Documentation

Full documentation: docs/README.mdx

Section Topics
Getting started Install, quickstart, first pipeline
Guides Ingestion through distributed execution
CLI Commands and workflows
Configuration Pipeline, datasets, outputs, env
Architecture Execution graph, Stage0, scheduler
Developer Contributing, testing, extensions
Reference API, CLI, configuration keys

Examples

Example Description
examples/merge_local.py Local single-worker merge
examples/merge_custom_config.py YAML quality profile
examples/merge_custom_output.py Custom output and work paths
examples/merge_dask.py Dask backend

Contributing

Contributions are welcome. Run indw validate before submitting pipeline changes.

See Contributing.

License

Apache-2.0. See LICENSE and NOTICE.

Determinism and validation

INDW treats reproducibility as a first-class requirement. The apply coordinator writes survivors in strict document sequence. The canonical output hash (sorted_output_hash) is stable across worker counts and execution backends when the quality configuration and input corpus are unchanged.

Run acceptance checks after pipeline changes:

indw validate

This executes the parity suite: local vs multiprocess backend match, workers=1 vs workers=N hash match, and tier admission consistency.

Optional capabilities

Install extras only when needed:

Extra Capability
language Language detection (langid)
dedup Fuzzy MinHash dedup
ann ANN index for semantic dedup
embedding Sentence-transformer providers
distributed Dask cluster backend
monitor Prometheus and OpenTelemetry hooks
pip install -e ".[all]"

Observability

Merge runs emit stage metrics, scheduler reports, and optional Stage0 audit events. Use indw audit --kind pipeline with a populated work directory to inspect architecture and throughput estimates. Production certification uses indw audit --kind production and indw benchmark.

Work directories are the operational source of truth for a run: resolved config, checkpoints, filtered output, and JSON audit artifacts.

Support and community

Report issues through the project issue tracker. Security disclosures follow SECURITY.md. Documentation corrections and guide contributions are welcome via pull request; see Contributing.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

indw-1.0.tar.gz (541.9 kB view details)

Uploaded Source

Built Distribution

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

indw-1.0-py3-none-any.whl (713.0 kB view details)

Uploaded Python 3

File details

Details for the file indw-1.0.tar.gz.

File metadata

  • Download URL: indw-1.0.tar.gz
  • Upload date:
  • Size: 541.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for indw-1.0.tar.gz
Algorithm Hash digest
SHA256 ec776736471260501c7ebaf4d26b663b30c8ef8228d66e0e866b9c4633c23278
MD5 1f75a38fc7f2217d0e32271937d60a5d
BLAKE2b-256 97c5f0bcdb606f1d3662086b9aaa027f8b4f5c66c200b89f8c13ded8354bbfd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for indw-1.0.tar.gz:

Publisher: publish-pypi.yml on InstantAI-Labs/InstantAI-Data-Workflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file indw-1.0-py3-none-any.whl.

File metadata

  • Download URL: indw-1.0-py3-none-any.whl
  • Upload date:
  • Size: 713.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for indw-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acc06e6d50058bc677e66b51558909aa97ed1696614d01a724533e397ca1d47b
MD5 bf3af1434b7ee7d30af36b77d002d284
BLAKE2b-256 132c662643b057627ec90aa4f685b3cf4211bf26f4e5fb840d2a8fc90c964bb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for indw-1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on InstantAI-Labs/InstantAI-Data-Workflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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