SuperAPI AI 工具集

validation-scripts

通用与其它

查看项目

更新于 10-16 05:47

技能介绍

用途:为 ML 训练工作流提供生产可用的验证与测试工具,在训练前、中、后检查数据质量、模型完整性、流水线正确性与依赖可用性。

主要能力:包含四个脚本。validate-data.sh 校验数据集格式、schema、字段类型、必填项、取值范围、文本质量、重复项、token 长度与标签分布;validate-model.sh 校验检查点文件结构、配置、权重可加载性、tokenizer、推理、量化与 LoRA/PEFT;test-pipeline.sh 端到端测试数据加载、分词、模型加载、训练/验证步、检查点保存与加载、推理与指标;check-dependencies.sh 检查 Python、框架、CUDA/cuDNN、GPU 与显存、系统与 pip 包、平台工具、存储与网络。

使用方式:脚本以 bash 调用,例如 bash scripts/validate-data.sh --data-path ./data/train.jsonl --format jsonl --schema templates/validation-schema.json;bash scripts/validate-model.sh --model-path ./checkpoints/epoch-3 --framework pytorch --check-weights;bash scripts/test-pipeline.sh --config templates/test-config.yaml --data ./data/sample.jsonl --verbose;bash scripts/check-dependencies.sh --framework pytorch --gpu-required --min-vram 16。提供 templates/test-config.yaml 与 templates/validation-schema.json 模板,可接入 CI/CD。

适用场景:微调前数据校验、检查点与推理验证、训练失败或数据问题排查、新平台依赖检查、流水线回归测试。

限制:资料未提供安装方式、收费、价格与具体平台效果;脚本依赖 jsonschema、pandas、pyarrow、jq、bc 等工具,需自行准备;部分检查项需 GPU 与对应框架环境。