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
- 参考文档references/configuration.md5.4 KB
- 参考文档references/data-formats.md5.4 KB
- 参考文档references/troubleshooting.md4.6 KB
- 脚本scripts/jsonl_to_lmdb.py9.7 KB
- 脚本scripts/validate_config.py12.7 KB
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; readreferences/data-formats.mdfirst for the row schema. - Validate a YAML task config without importing PyTorch, Transformers, or Lightning with
scripts/validate_config.py; readreferences/configuration.mdfor 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-likelengthkey plus numeric row keys from0tolength - 1.DataInterface.init_dataset(dataset_py_path, **kwargs)dynamically imports a dataset module path such assaprot/saprot_regression_dataset; do not include the leadingdataset/directory or the.pysuffix in YAML.- SaProt config paths are conventionally resolved from the run base: LMDB data under
LMDB/, Hugging Face tokenizer/model directories underweights/PLMs/, model modules undermodel/, and dataset modules underdataset/. - LMDB row values are UTF-8 JSON object strings; each dataset class expects different fields, so validate JSONL with the matching
--dataset-typebefore 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
- Choose the target dataset schema from
references/data-formats.md. - 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 - Confirm the converter reports
info,length, and numeric keys. - Repeat for
train,valid, andtestdirectories if the YAML will use all three stages.
YAML validation
- Edit paths relative to the intended SaProt run base, not relative to the config file location unless those are the same.
- Check module paths, asset paths, LMDB keys, and Trainer backend choices:
python scripts/validate_config.py --config task.yaml --base-dir . - Add
--require-assetswhen the machine is expected to already contain LMDB and model/tokenizer directories. - 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
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).