text-classification
Routes legacy TensorFlow 1.x text-classification workflows for brightmart/text_classification, including raw data preparation, classic baselines, seq2seq and memory models, relation workflows, and ensemble post-processing.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- text-classification
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes legacy TensorFlow 1.x text-classification workflows for brightmart/text_classification, including raw data preparation, classic baselines, seq2seq and memory models, relation workflows, and ensemble post-processing.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/model-overview.md6.5 KB
- 参考文档references/repo-provenance.md3.6 KB
- 参考文档references/repo-routing-metadata.json546 B
- 参考文档references/troubleshooting.md8.7 KB
- 脚本scripts/check_legacy_text_classification_env.py18.4 KB
03 SKILL.md 正文
text-classification
Use this repo skill for the legacy brightmart/text_classification checkout: a TensorFlow 1.x / TFLearn-era collection of classic text-classification models, Zhihu-style data utilities, seq2seq label generation, memory-network variants, relation workflows, and logit post-processing helpers.
This repository is not an installable Python package. When you need runtime inspection, use a Python 3.7-era TensorFlow 1.x/TFLearn environment and the bundled smoke scripts; do not assume TensorFlow 2.x, eager execution, or Python 3.13 compatibility.
Start here
- Read
references/repo-provenance.mdif you need to compare this skill against another checkout or decide whether it is stale. - Read
references/model-overview.mdfor the high-level model-family map. - Read
references/troubleshooting.mdfor cross-cutting TensorFlow 1.x, cache, checkpoint, and import pitfalls. - Use
scripts/check_legacy_text_classification_env.pywhen you want a safe environment/import smoke check.
Route map
| Task signal | Read this sub-skill | Why |
|---|---|---|
Raw text lines, __label__ parsing, vocabulary/label dictionaries, n-grams, cache keys, TSV validation, label formatting |
sub-skills/data-preparation/SKILL.md |
Validates and normalizes the repo's Zhihu-style data formats before a model run. |
| fastTextB, TextCNN, TextRNN, TextRCNN, Hierarchical Attention Network, BERT, toy TFLearn examples, graph-shape inspection | sub-skills/classification-models/SKILL.md |
Covers the classic flat classifier families and their checkpoints, shapes, and losses. |
Seq2seq with attention, Transformer seq2seq/classifier, EntityNetwork, Dynamic Memory Network, _GO/_END/_PAD label generation |
sub-skills/sequence-and-memory-models/SKILL.md |
Covers sequence-generation and memory-network style workflows. |
| Two-sentence relation classification, TextCNN+RCNN hybrids, boosting label weights, ensemble logit fusion | sub-skills/relation-and-ensemble-workflows/SKILL.md |
Covers paired-input workflows and post-processing of exported logits. |
Shared references
references/model-overview.md— concise model-family selection guide for the repo.references/troubleshooting.md— cross-cutting failure patterns that affect more than one sub-skill.references/repo-provenance.md— commit, dirty-state, and evidence-path snapshot for staleness checks.references/repo-routing-metadata.json— structured metadata consumed by the repo-skills router during import.
Shared scripts
scripts/check_legacy_text_classification_env.py— safe import/environment smoke check for the legacy TensorFlow 1.x stack and common helper modules.
Operating rules
- Prefer the closest sub-skill instead of trying to solve every workflow from the root.
- Treat README performance numbers as historical context, not a reproduction guarantee.
- Expect external HDF5 caches, pickle vocabularies, pretrained word2vec binaries, checkpoint directories, and long runs for full training/prediction.
- Use
data-preparationfirst whenever raw line formats, cache keys, or label encodings are unclear; many downstream failures start there. - Use
classification-modelsfor the main flat classifiers; usesequence-and-memory-modelsonly when label generation or memory context is part of the contract. - Use
relation-and-ensemble-workflowsfor two-input relation tasks, hybrid CNN+RCNN variants, boosting, and logit fusion instead of trying to adapt a flat classifier ad hoc.
When to cross-check
- If a task mentions a specific model family, read that sub-skill's references before making graph or data claims.
- If a task mentions checkpoint restore, label-map mismatch, or fixed batch sizes, read the appropriate troubleshooting page before rerunning anything.
- If you are considering a refresh for another checkout, compare the current repository state to
references/repo-provenance.mdfirst.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).