计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
classification【效率与协作】Construct and adapt XLNet run_classifier.py classification and regression workflows for processor-backed tasks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to fine-tune, evaluate, or generate predictions with XLNet's processor-backed run_classifier.py workflow.
task_name=mnli_matched or task_name=mnli_mismatched.task_name=sts-b and --is_regression=True.task_name=imdb.task_name=yelp5.../squad-qa/.../race-reading-comprehension/.../model-api/.Identify the task processor and raw data layout in references/data-formats.md. Do not assume arbitrary TSV columns are configurable: the built-in processors hard-code filenames, columns, and labels.
Separate the runtime paths before generating a command:
data_dir: raw GLUE/IMDB/Yelp data.output_dir: generated TFRecord cache.model_dir: fine-tuned checkpoints and TensorFlow event files.init_checkpoint: released or already fine-tuned checkpoint used only to initialize variables, normally during training.predict_dir: prediction TSV/logit JSON destination for --do_predict=True.Use the bundled safe command generator, not a source notebook or shell snippet, to produce a command template:
python scripts/build_classifier_command.py --help
The generator prints a python run_classifier.py ... command and never downloads data, launches training, or opens checkpoints.
Apply the task-specific workflow guidance in references/workflows.md. For STS-B, keep regression mode enabled in every train/eval/predict command.
Check CLI semantics in references/cli-reference.md, especially GPU/TPU flags, per-GPU train_batch_size, eval_all_ckpt, and prediction outputs.
Before running an expensive job, review references/troubleshooting.md for stale TFRecord caches, missing model artifacts, bad dataset layout, GPU memory limits, TPU/GCS path mismatches, and multi-GPU eval pitfalls.
task_name values in this sub-skill are exactly mnli_matched, mnli_mismatched, sts-b, imdb, and yelp5.sts-b is regression. Always pass --is_regression=True; evaluation sorts by eval_pearsonr instead of eval_accuracy.MirroredStrategy; in this codebase, train_batch_size is per GPU, not global.model_dir separate from the pretrained init_checkpoint directory. Eval-all-checkpoints should scan fine-tuned checkpoints in model_dir, not the released model directory.output_dir is a preprocessing cache. Change it or pass --overwrite_data=True when changing task data, sequence length, SentencePiece model, or regression/classification mode.