Skip to main content

kcai-data-sampling

The command-line front door to kcai data-sampling, and the place its pieces are composed.

A transformation is one fully specified operation,

T : x ↦ x'

taking one input sample to one output sample in the same space — an algorithm, its resolved parameters, a seed where it draws randomness, and a model where one is involved. This package installs the core contracts that define that operation and the CLI that inspects it. Every method, and every piece of IO, lives in a separate package you add yourself.

What it ships today

  • version — the installed versions of the umbrella, the core, and every member package (None when absent).
  • list — every registered plugin, grouped into transformations, models, dataloaders and output writers.
  • process — run a sampling job from a YAML configuration. Available only when the job package is installed; see the [job] extra below.

Install

pip install kcai-data-sampling

That is the base install, and it is deliberately small: the core library plus the CLI. It resolves to two distributions and nothing more.

A consequence worth knowing: because the CLI builds its command list from what is actually importable, a base install gives you a working kcai-data-sampling with version and list — and no process. That is not a broken install; it is the designed default. version reports the absent members rather than hiding them:

kcai-data-sampling: 0.1.0
core: 0.1.0
job: None
images: None
fgsm: None
lama: None
albumentation: None

Every member is listed whether or not it is installed, so this is also the quickest way to confirm a large extra landed: [lama] pulls CPU or CUDA torch, and lama: None tells you it did not. Add the extra for the surface you want and the matching command appears.

Extras

Extra Adds Notes
job the job package: the process command, the parquet dataloader, and the images and parquet output writers the YAML pipeline; also where image-file handling and Pillow live
images horizontal_flip and crop_resize, plus the image batch type numpy only
fgsm the fgsm attack numpy only, no torch
lama inpaint and the lama_inpaint tool model pulls torch; the checkpoint is fetched on first use
albumentation the albumentations-backed image transforms pinned albumentations from a git commit, headless OpenCV, no torch
notebooks pandas, python-pptx, ipykernel and ultralytics — for reading and plotting results installs no fgsm and no lama; still resolves torch, because ultralytics depends on it
all every row above the recipe to use if you want the whole set

Install one, or combine them:

pip install "kcai-data-sampling[job,images]"
pip install "kcai-data-sampling[all]"

The extras are independent — asking for [job] installs the job package and leaves the image methods out — so a project can compose exactly the surface it needs. kcai-data-sampling version is the quickest way to see what a given install actually resolved to.

The three families

Methods are grouped by the model's role, not chosen by hand:

Model role Family Meaning
no model procedural computed from the input sample alone
tool generative the model produces the output content
target adversarial the model's response enters the computation

Two more properties hold across all of them. Transformations listed together are applied independently to the same source sample, not chained. And whether an output is an augmentation or a corruption is not declared by the algorithm: it is judged downstream, against a task. The output only records reversible.

Running a job

With the job extra installed:

kcai-data-sampling process -p config.yaml
dataloaders:
  loaders:
    - name: images
      type: parquet
      path: /path/to/samples.parquet
      id_column: id
      load_batch_size: 10
      decode: img_bytes
      sample_path:
        - column: path
          prefix: /path/to/images

operations:
  outputs:
    path: /path/to/outputs/{selection}/ledger.parquet
    write_samples: true
    samples_dir: /path/to/outputs/{selection}/payloads
  transformations:
    - name: horizontal_flip
      type: horizontal_flip

Each run writes a ledger — one metadata-only row per generated sample, recording its lineage and the algorithm's declaration — and the payloads beside it as content-addressed files.

Where to go next

The sibling packages each document one thing: the core contracts and how to add your own method, the procedural slot, the job's orchestration, and the generative and adversarial slots. Their names are the distribution names, and each is installed through the matching extra above.

Metadata

Release files for kcai-data-sampling 0.8.1

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

Source distribution (sdist)

Source distribution for kcai-data-sampling 0.8.1
File Size Uploaded Provenance Actions
kcai_data_sampling-0.8.1.tar.gz 10.4 kB Without provenance Details for kcai_data_sampling-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kcai-data-sampling 0.8.1
File Interpreter ABI Platform Actions
kcai_data_sampling-0.8.1-py3-none-any.whl Python 3 none any Details for kcai_data_sampling-0.8.1-py3-none-any.whl

Total release size: 19.3 kB

Release files / kcai_data_sampling-0.8.1.tar.gz

Download URL kcai_data_sampling-0.8.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
422918ad3126decc43862797fe51e63722a0607c214e1762701e0dd419a81cde
BLAKE2b-256 checksum
How to use checksums
f1fb0c496229593d8e2bc07176a2469eba67b42b450aa5ccd9276248aa4e357c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.17

Release files / kcai_data_sampling-0.8.1-py3-none-any.whl

Download URL kcai_data_sampling-0.8.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca8ce8b550ab5209fb0cefc92171660c4103978f5ffe87893ae3dd43b08cee1f
BLAKE2b-256 checksum
How to use checksums
11b7fb57ea4fcfafcc7681fed7597ecdd17d8a420aade51b95bb0f2cf5e3b688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.17

Security for kcai-data-sampling 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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