AGENT SKILL

datasets-configs

Understand SaProt LMDB datasets, JSONL-to-LMDB conversion, task YAML paths, and safe config validation.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
datasets-configs
license
MIT
metadata
{ "disco-role": "operating" }
description
Understand SaProt LMDB datasets, JSONL-to-LMDB conversion, task YAML paths, and safe config validation.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

SaProt Datasets and Configs

Use this sub-skill when the task is about SaProt LMDB layout, JSON row fields, dataset initialization paths, tokenizer/model asset locations, or editing a task YAML before a training or evaluation run.

Quick Routing

  • Convert JSONL rows into a SaProt-style LMDB with scripts/jsonl_to_lmdb.py; read references/data-formats.md first for the row schema.
  • Validate a YAML task config without importing PyTorch, Transformers, or Lightning with scripts/validate_config.py; read references/configuration.md for path rules.
  • Route full training, evaluation, Lightning launch behavior, WandB logging, checkpoint selection, and expensive benchmark execution to training-evaluation.
  • Route model loading, tokenization behavior, embeddings, mutation scoring, and forward-pass details to model-inference.
  • Route PDB/mmCIF-to-SaProt sequence conversion, Foldseek setup, chain selection, and pLDDT masking from structures to structure-sequences.

Core Facts

  • LMDBDataset(train_lmdb=None, valid_lmdb=None, test_lmdb=None, dataloader_kwargs=None) opens one LMDB directory per stage and expects an integer-like length key plus numeric row keys from 0 to length - 1.
  • DataInterface.init_dataset(dataset_py_path, **kwargs) dynamically imports a dataset module path such as saprot/saprot_regression_dataset; do not include the leading dataset/ directory or the .py suffix in YAML.
  • SaProt config paths are conventionally resolved from the run base: LMDB data under LMDB/, Hugging Face tokenizer/model directories under weights/PLMs/, model modules under model/, and dataset modules under dataset/.
  • LMDB row values are UTF-8 JSON object strings; each dataset class expects different fields, so validate JSONL with the matching --dataset-type before writing a database.
  • Keep data/config checks separate from execution: a config can be syntactically valid while still requiring model weights, LMDB assets, compatible GPUs, and the training stack before a real run.

Safe Workflows

JSONL to LMDB

  1. Choose the target dataset schema from references/data-formats.md.
  2. Validate and write rows with the bundled converter: python scripts/jsonl_to_lmdb.py --jsonl rows.jsonl --lmdb-dir LMDB/MyTask/foldseek/train --dataset-type regression --map-size-gb 10240
  3. Confirm the converter reports info, length, and numeric keys.
  4. Repeat for train, valid, and test directories if the YAML will use all three stages.

YAML validation

  1. Edit paths relative to the intended SaProt run base, not relative to the config file location unless those are the same.
  2. Check module paths, asset paths, LMDB keys, and Trainer backend choices: python scripts/validate_config.py --config task.yaml --base-dir .
  3. Add --require-assets when the machine is expected to already contain LMDB and model/tokenizer directories.
  4. Do not launch training until validation errors are resolved and remaining warnings are intentionally accepted.

Reference Map

  • references/data-formats.md: LMDB key layout, dataset constructor behavior, JSON row fields, and converter usage.
  • references/configuration.md: YAML section meanings, module path resolution, asset placement, CPU smoke-test adaptation, and backend validation.
  • references/troubleshooting.md: common LMDB, JSON field, tokenizer path, pLDDT, map-size, relative path, and GPU-device failures.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351