Datasets readers

From lza6/Armor-piercing-system-prompts · View interactive version

Datasets readers is an AI agent skill from the GitHub repository lza6/Armor-piercing-system-prompts. Build Nitrain datasets from files, CSV/TSV columns, folder labels, in-memory data, example fixtures, and Google Cloud inputs.

How to use this skill

Skill file

Datasets and readers

Use this sub-skill when a user needs to turn imaging files or tabular labels

into a nitrain.Dataset, infer a reader from nested Python objects, load the

built-in example fixture, or connect a dataset to Google Cloud storage.

What belongs here

reader composition, and automatic inference.

What does not belong here

sub-skills/preprocessing-and-loading/.

sub-skills/models-training/.

sub-skills/prediction-and-explanation/.

Typical user requests

Working pattern

  1. Decide whether the input source is local files, in-memory data, or Google

Cloud storage.

  1. Pick the smallest reader that matches the data shape.
  2. Use base_dir for directory-relative files and base_file for CSV/TSV

columns.

  1. Use infer_reader() when the user already has nested lists, arrays, or

dictionaries and does not want to spell out reader classes manually.

  1. Keep output labels explicit so later transforms and samplers can route by

name.

Read these references

constructor signatures and return behavior.

dataset-building patterns and example snippets.

files, mismatched lengths, malformed patterns, and GCS credential issues.

Smoke check

After installing dependencies, run the bundled helper scripts/check_install.py:

python scripts/check_install.py --mode datasets

Use this when you want to confirm the reader and dataset surface before moving

on to preprocessing or training.

Key decision points

Common outcomes

support select() for subset reuse.

Watch for these signals

path, or exclude filter is wrong.

the core Nitrain API.

Before handing off

If the request grows into sampling, augmentation, batching, or model training,

hand off to the relevant sibling sub-skill instead of expanding this one.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.