generative-models
Plan and troubleshoot DGL-LifeSci molecular generative workflows with DGMG, JTVAE/JTNNVAE, vocabulary handling, reconstruction, pretraining, generation, and safe input validation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- generative-models
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Plan and troubleshoot DGL-LifeSci molecular generative workflows with DGMG, JTVAE/JTNNVAE, vocabulary handling, reconstruction, pretraining, generation, and safe input validation.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-formats.md6.4 KB
- 参考文档references/troubleshooting.md9.4 KB
- 参考文档references/workflows.md8.7 KB
- 脚本scripts/validate_generative_inputs.py10.1 KB
03 SKILL.md 正文
Generative Models
Use this sub-skill when an agent needs to plan, adapt, or debug DGL-LifeSci molecular generation workflows built around dgllife.model.DGMG, dgllife.model.JTNNVAE, dgllife.utils.JTVAEVocab, JTVAE MolTree utilities, or JTVAE datasets/collators.
Use This For
- Choosing between DGMG autoregressive graph generation and JTVAE/JTNNVAE junction-tree variational autoencoding.
- Preparing SMILES text inputs, DGMG atom/bond vocabularies, JTVAE vocabulary files, reconstruction inputs, and checkpoint expectations.
- Planning DGMG train/eval/generate or JTVAE pretrain/vae-train/reconstruct workflows without launching long training jobs.
- Diagnosing RDKit parseability, vocabulary mismatch, invalid generated molecules, checkpoint shape errors, and CPU/GPU/runtime issues.
Route Elsewhere
- For generic SMILES cleaning, CSV schemas, graph featurizers, and molecule dataset basics, use
../molecule-data-prep/SKILL.md. - For generic model-zoo constructor inspection or pretrained model loading outside DGMG/JTVAE, use
../model-zoo-pretraining/SKILL.md. - For property-prediction metrics, split strategy, training loops, and supervised evaluation, use
../property-prediction/SKILL.md.
References
- Read references/workflows.md for DGMG/JTVAE planning, API entry points, CLI-style arguments, outputs, and safe/unsafe execution classes.
- Read references/data-formats.md for SMILES files, DGMG atom/bond types, JTVAE vocabulary/MolTree expectations, and checkpoint contracts.
- Read references/troubleshooting.md for import/install, optional dependencies, RDKit sensitivity, vocabulary mismatch, invalid molecules, checkpoint shape, and long-runtime failures.
- Run scripts/validate_generative_inputs.py to validate small SMILES fixtures and optional JTVAE vocabulary tokens without training or downloading data.
Fast Workflow
- Classify the task: DGMG for direct graph-generation decisions; JTVAE/JTNNVAE for junction-tree encoding, reconstruction, and latent sampling.
- Validate user SMILES or vocabulary files with
python scripts/validate_generative_inputs.py --smiles-file molecules.txt --max-rows 100before planning model code. - For JTVAE, add
--vocab-file vocab.txtor--derive-jtvae-vocabto detect malformed vocabulary tokens, duplicates, and missing MolTree vocabulary tokens. - Check
references/workflows.mdfor constructor signatures, expected checkpoint naming, and whether a requested action is safe as a smoke check or requires explicit user approval. - Use
references/troubleshooting.mdwhen RDKit, DGL, Torch, vocabulary, checkpoint, generation validity, or runtime symptoms appear.
Version Notes
The verified installed package was dgllife 0.3.1 with DGL 1.1.3, CPU Torch, RDKit, scikit-learn, NumPy/SciPy, and pandas importable. Verified generative signatures included DGMG(atom_types, bond_types, node_hidden_size=128, num_prop_rounds=2, dropout=0.2) and JTNNVAE(vocab, hidden_size, latent_size, depth, stereo=True).
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).