writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
pocket-flowUse PocketFlow for TensorFlow 1.x model compression, learner selection, custom model/data integration, execution setup, and deployment conversion workflows.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when the user asks about PocketFlow, Tencent's TensorFlow 1.x framework for compressing and accelerating computer-vision models with pruning, sparsification, quantization, distillation, and automated hyperparameter search.
Confirm the user is operating a PocketFlow-compatible source checkout or wants conceptual guidance for one. PocketFlow is a Python 3.6 / TensorFlow 1.x-era, checkout-style project rather than a modern packaged CLI.
Public setup baseline: create or activate a Python 3.6-compatible environment, then install the checkout's requirements from the repository root:
python -m pip install -r requirement.txt
Expose the checkout root on PYTHONPATH if running modules directly. PocketFlow has no pip install pocketflow package metadata in this snapshot.
Minimal verification command before any training or conversion work:
python - <<'PY'
import tensorflow as tf
print(tf.__version__)
assert tf.__version__.startswith('1.')
from tensorflow.contrib.lite.python import lite_constants
print('tf.contrib.lite ok')
PY
For a non-mutating checkout scan, run the bundled helper from this skill: python scripts/check_pocketflow_skill.py --repo-root <pocketflow-checkout> --check-tensorflow.
Decide which route below owns the task. Do not start downloads, long training, Docker, Seven cluster jobs, or model conversion until the user explicitly approves the required data, hardware, credentials, and side effects.
| User request | Read |
|---|---|
Install/import check, path.conf, local/docker/seven modes, command preview, GPU discovery, Horovod/TF-Plus, AutoML text adapters | execution-config |
| Pick a learner, set pruning/sparsification/quantization/distillation/RL flags, understand algorithm trade-offs | compression-learners |
| Add a custom dataset/model helper/run script, understand built-in CIFAR/ImageNet/Pascal VOC/Fashion-MNIST data contracts | custom-models-data |
| Export checkpoints to PB/TFLite, validate conversion artifacts, troubleshoot quantized/channel-pruned export, mobile deployment, inference timing | deployment-conversion |
| Check whether this skill matches a checkout, source commit, or supported evidence | repo provenance |
| Cross-cutting architecture and capability overview | overview |
| Cross-cutting failures involving TF1, optional GPU/multi-GPU, source checkout style, data/model downloads, or stale docs | troubleshooting |
AbstractDataset, AbstractModelHelper, built-in CIFAR-10/ImageNet/Pascal VOC helpers, and a Fashion-MNIST-style custom example pattern.path.conf and TensorFlow flags.Use check_pocketflow_skill.py to statically inspect a PocketFlow checkout and optionally test TensorFlow 1.x imports. Sub-skill helpers provide deeper config, command, learner, skeleton, and conversion checks.
nvidia-smi for idle GPU selection.