인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
데이터 및 연구 · SKILL.md

custom-models-data

custom-models-data

Add or adapt PocketFlow datasets, ModelHelper classes, built-in model/data combinations, and custom run scripts for compression tasks.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

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.
  • For path.conf, local/docker/seven launchers, command preview, GPU discovery, or runtime setup, route to execution-config.
  • 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. 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: 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. 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 - exact Dataset, ModelHelper, run-script, data-format, and forward_w_labels contracts.
  • Built-in models and datasets - source workflow matrix, data formats, key flags, and path-key conventions.
  • Custom model template - compact implementation recipe distilled from the Fashion-MNIST-style example.
  • Troubleshooting - 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.
  • 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.
저장한 Skills