torchdrug
Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.
npx skills add K-Dense-AI/scientific-agent-skills --skill torchdrug --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# TorchDrug Use TorchDrug as a modular PyTorch graph-learning stack: 1. load a `datasets.*` dataset, 2. choose a `models.*` representation model, 3. wrap it in a `tasks.*` objective, 4. train and evaluate it with `core.Engine`. The current official documentation and latest release are both **0.2.1**. Treat newer Python or PyTorch combinations as unverified rather than silently assuming compatibility. ## Start with the version guard Before generating or debugging code, inspect the environment: ```bash python --version python -c "import torch; print(torch.__version__)" python -c "import torchdrug; print(torchdrug.__version__)" ``` The supported matrix for TorchDrug 0.2.1 is: - Python 3.7 through 3.10 - PyTorch 1.8 through 2.0 - Linux, Windows, or macOS - Apple Silicon: PyTorch 1.13 or later, CPU only; no MPS support If the project uses Python 3.11+ or PyTorch 2.1+, create a compatible environment or explicitly test a source build. Do not present such combinations as supported. ## Installation Prefer a dedicated Python 3.10 environment and pin the TorchDrug release: ```bash uv venv --python 3.10 source .venv/bin/activate uv pip install "torch==2.0.0" ``` Install `torch-scatter` and `t
- Start with the version guard
- Installation
- Canonical property-prediction workflow
- Choose the official workflow
- Molecular property prediction
- Self-supervised molecular pretraining
- Molecule generation
- Retrosynthesis
- Knowledge graph reasoning
- Protein modeling
- Rules for reliable TorchDrug code
- Troubleshooting
- Installation or import failure
- Feature dimension mismatch
python --version python -c "import torch; print(torch.__version__)" python -c "import torchdrug; print(torchdrug.__version__)" uv venv --python 3.10 source .venv/bin/activate uv pip install "torch==2.0.0" uv pip install "torch-scatter==2.1.1" "torch-cluster==1.6.1" \ uv pip install "torchdrug==0.2.1"
What does the torchdrug skill do?
Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.
How do I install it?
Run `npx skills add K-Dense-AI/scientific-agent-skills --skill torchdrug --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
