Skip to content
Back to skills

Custom Models Data

ASecurity

"Add or adapt PocketFlow datasets, ModelHelper classes, built-in

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolspythongodockerapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill custom-models-data --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Custom Models Data?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Custom Models Data
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-custom-models-data/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-custom-models-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: custom-models-data
description: "Add or adapt PocketFlow datasets, ModelHelper classes, built-in
  model/data combinations, and custom run scripts for compression tasks."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# PocketFlow Custom Models and Data

Use this sub-skill when the user wants to add a new dataset, write or adapt a `ModelHelper`, reuse a built-in model/data combination, or create the `*_at_<dataset>_run.py` execution script that hands a helper to PocketFlow learners.

## Route first

- For learner IDs, compression algorithms, distillation, pruning, sparsification, or quantization flags, route to [compression-learners](../compression-learners/SKILL.md).
- For `path.conf`, local/docker/seven launchers, command preview, GPU discovery, or runtime setup, route to [execution-config](../execution-config/SKILL.md).
- Stay here for the Dataset/ModelHelper/run-script contracts and for adapting built-in dataset/model pairs.

## Operating checklist

1. Identify the task shape: image classification uses `(images, one_hot_labels)` iterators; detection-style helpers may return dictionaries and packed object tensors.
2. Choose the closest built-in combination from [built-in-models-datasets.md](references/built-in-models-datasets.md). Prefer adapting a new file rather than editing a built-in helper directly.
3. Implement a dataset subclass that calls `AbstractDataset.__init__(is_train)`, sets the path-dependent file pattern or overrides `build()`, and returns TensorFlow 1.x iterators.
4. Implement `ModelHelper` against the current abstract contract in [api-contracts.md](references/api-contracts.md): call `AbstractModelHelper.__init__(data_format, forward_w_labels=False)`, create no TensorFlow ops in the constructor, and implement dataset, forward, loss, learning-rate, and name properties.
5. Create a run script that imports `ModelHelper`, defines the common PocketFlow flags, calls `create_learner(sm_writer, model_helper)`, and dispatches `train` or `eval`.
6. If the user needs a starter scaffold, use the bundled helper [generate_model_helper_skeleton.py](scripts/generate_model_helper_skeleton.py). This helper is a DisCo template generator, not an official PocketFlow source script.
7. Before running training, validate that `path.conf` uses the dataset key implied by the run script name and that the selected learner supports the helper's forward signature.

## References

- [API contracts](references/api-contracts.md) - exact Dataset, ModelHelper, run-script, data-format, and `forward_w_labels` contracts.
- [Built-in models and datasets](references/built-in-models-datasets.md) - source workflow matrix, data formats, key flags, and path-key conventions.
- [Custom model template](references/custom-model-template.md) - compact implementation recipe distilled from the Fashion-MNIST-style example.
- [Troubleshooting](references/troubleshooting.md) - common data directory, shape, label, TensorFlow 1.x, and run-script failures.

## Safety boundaries

- Do not start downloads or training from this sub-skill. Generate or review code/templates, then route execution setup to [execution-config](../execution-config/SKILL.md).
- Do not assume TensorFlow 2 compatibility; PocketFlow is a TensorFlow 1.x, Python 3.6-era checkout-style codebase.
- Do not claim a bundled helper is part of the upstream PocketFlow repository; bundled helpers live only in this generated skill tree.

Files in this skill

  • SKILL.md3.4 KB
  • references/api-contracts.md7 KB
  • references/built-in-models-datasets.md6.1 KB
  • references/custom-model-template.md5.2 KB
  • references/troubleshooting.md2.5 KB
  • scripts/generate_model_helper_skeleton.py7.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.