Skill Tracer
Skills › Scientific Agent Skills › torchdrug › review.md

review.md

123 lines · skills/torchdrug/references/review.md at 5f2bc03

Open on GitHub
1# TorchDrug review evidence — 2026-10-01
2

TorchDrug review evidence — 2026-10-01

Raw lines 1 to 2
3## Release and environment
4
5The latest published TorchDrug remains **0.2.1**, released July 16, 2023. The
6published wheel requires Python `>=3.7,<3.11`; release notes claim PyTorch
71.8–2.0 compatibility. Its unconstrained `torch>=1.8` dependency is not proof
8that current PyTorch works. This review used the published wheel and current
90.2.1 documentation, including all five tutorials referenced by the skill.
11Native CPU tests ran on macOS ARM64 with Python 3.10.20, TorchDrug 0.2.1,
12PyTorch 2.0.0, NumPy 1.26.4, SciPy 1.13.1, rdkit-pypi 2022.9.5,
13torch-scatter 2.1.2, torch-cluster 1.6.3, fair-esm 2.0.0, decorator 5.1.1,
14and setuptools 80.10.2. This is a legacy compatibility environment, not a
15recommendation to upgrade unrelated projects to these pins.
17Native builds need a working C++ compiler/SDK. On Apple Silicon the tested
18scatter/cluster build was staged after installing PyTorch:
20```bash
21uv pip install "torch==2.0.0" "numpy==1.26.4" "setuptools==80.10.2" wheel
22uv pip install --no-build-isolation "torch-scatter==2.1.2" "torch-cluster==1.6.3"
23uv pip install "torchdrug==0.2.1" "numpy==1.26.4" "scipy==1.13.1" \
24 "rdkit-pypi==2022.9.5" "fair-esm==2.0.0" "decorator==5.1.1"
25```
27The unmodified build command initially failed under the audit host's current
28Apple Clang: PyTorch 2.0 headers specialize `std::is_arithmetic`, which the newer
29SDK diagnoses as `-Winvalid-specialization`. For this audit only, compilation
30used `-Wno-invalid-specialization`: `CXXFLAGS` for the two package builds and a
31compiler wrapper passed through `CXX` for TorchDrug's just-in-time C++ extensions.
32No library source, operators, or model results were replaced. Use a compatible
33compiler/SDK or explicitly validate such a workaround on the target host; this
34is not an upstream support claim. `ninja` must be available on `PATH`, so activate
35the environment before executing workflows. The available SciPy 1.15.3 macOS
36CPython 3.10 wheel also failed `dlopen` on this host; 1.13.1 passed.
38The official PyG PyTorch 2.0 CPU wheel index has no macOS ARM64 binaries. A fresh
39one-command dependency resolver can fail because scatter/cluster's source build
40needs PyTorch in its build environment. A successful run against cached locally
41built wheels does not prove that a fresh resolver can install this stack.
43For uv's isolated source builds, its documented `extra-build-dependencies`
44setting can supply the missing build requirements without installing scientific
45packages in the repository environment. Use these exact build pins in `uv.toml`
46and select it with `--config-file` (the repository carries the same configuration
47under `tests/torchdrug/uv.toml`):
49```toml
50[extra-build-dependencies]
51torch-scatter = ["torch==2.0.0", "numpy==1.26.4", "setuptools==80.10.2"]
52torch-cluster = ["torch==2.0.0", "numpy==1.26.4", "setuptools==80.10.2"]
53```
55This supplies Python build dependencies; it does not provide a compiler/SDK or
56remove the host-specific Clang incompatibility above. Exact pins avoid assuming
57that a dynamically generated package's metadata supports `match-runtime`.

Release and environment

The latest published TorchDrug remains 0.2.1, released July 16, 2023. The published wheel requires Python >=3.7,<3.11; release notes claim PyTorch 1.8–2.0 compatibility. Its unconstrained torch>=1.8 dependency is not proof that current PyTorch works. This review used the published wheel and current 0.2.1 documentation, including all five tutorials referenced by the skill.

Native CPU tests ran on macOS ARM64 with Python 3.10.20, TorchDrug 0.2.1, PyTorch 2.0.0, NumPy 1.26.4, SciPy 1.13.1, rdkit-pypi 2022.9.5, torch-scatter 2.1.2, torch-cluster 1.6.3, fair-esm 2.0.0, decorator 5.1.1, and setuptools 80.10.2. This is a legacy compatibility environment, not a recommendation to upgrade unrelated projects to these pins.

Native builds need a working C++ compiler/SDK. On Apple Silicon the tested scatter/cluster build was staged after installing PyTorch:

uv pip install "torch==2.0.0" "numpy==1.26.4" "setuptools==80.10.2" wheel
uv pip install --no-build-isolation "torch-scatter==2.1.2" "torch-cluster==1.6.3"
uv pip install "torchdrug==0.2.1" "numpy==1.26.4" "scipy==1.13.1" \
  "rdkit-pypi==2022.9.5" "fair-esm==2.0.0" "decorator==5.1.1"

The unmodified build command initially failed under the audit host's current Apple Clang: PyTorch 2.0 headers specialize std::is_arithmetic, which the newer SDK diagnoses as -Winvalid-specialization. For this audit only, compilation used -Wno-invalid-specialization: CXXFLAGS for the two package builds and a compiler wrapper passed through CXX for TorchDrug's just-in-time C++ extensions. No library source, operators, or model results were replaced. Use a compatible compiler/SDK or explicitly validate such a workaround on the target host; this is not an upstream support claim. ninja must be available on PATH, so activate the environment before executing workflows. The available SciPy 1.15.3 macOS CPython 3.10 wheel also failed dlopen on this host; 1.13.1 passed.

The official PyG PyTorch 2.0 CPU wheel index has no macOS ARM64 binaries. A fresh one-command dependency resolver can fail because scatter/cluster's source build needs PyTorch in its build environment. A successful run against cached locally built wheels does not prove that a fresh resolver can install this stack.

For uv's isolated source builds, its documented extra-build-dependencies setting can supply the missing build requirements without installing scientific packages in the repository environment. Use these exact build pins in uv.toml and select it with --config-file (the repository carries the same configuration under tests/torchdrug/uv.toml):

[extra-build-dependencies]
torch-scatter = ["torch==2.0.0", "numpy==1.26.4", "setuptools==80.10.2"]
torch-cluster = ["torch==2.0.0", "numpy==1.26.4", "setuptools==80.10.2"]

This supplies Python build dependencies; it does not provide a compiler/SDK or remove the host-specific Clang incompatibility above. Exact pins avoid assuming that a dynamically generated package's metadata supports match-runtime.

Raw lines 3 to 58
59## Executed checks
61The repository suite `tests/torchdrug/test_workflows.py` uses small local inputs
62and covers molecule packing/conversion, GIN forward, an Engine optimizer step,
63binary prediction, checkpoint/configuration restoration, regression output
64scale, scaffold separation, AttributeMasking and InfoGraph loss/encoder transfer,
65protein residue views and vector targets, unknown-residue behavior, GCPN and
66GraphAF NLL, filtered all-entity knowledge-graph ranking, and retrosynthesis
67checkpoint loading. Synthetic training verifies execution, not predictive quality.
69The ClinTox HTTPS gzip was downloaded in full (19,870 bytes), its checksum
70matched the release MD5, and native loading retained 1,478 molecules from 1,484
71raw rows. A small GIN performed one optimizer step and predicted an 8-by-2 batch.
72This verifies the cache-repair workflow; it is not a ClinTox benchmark result.
73All 68 Python documentation fences parsed; the 73 direct TorchDrug calls had
74compatible released signatures, excluding the explicitly marked negative example.

Executed checks

The repository suite tests/torchdrug/test_workflows.py uses small local inputs and covers molecule packing/conversion, GIN forward, an Engine optimizer step, binary prediction, checkpoint/configuration restoration, regression output scale, scaffold separation, AttributeMasking and InfoGraph loss/encoder transfer, protein residue views and vector targets, unknown-residue behavior, GCPN and GraphAF NLL, filtered all-entity knowledge-graph ranking, and retrosynthesis checkpoint loading. Synthetic training verifies execution, not predictive quality.

The ClinTox HTTPS gzip was downloaded in full (19,870 bytes), its checksum matched the release MD5, and native loading retained 1,478 molecules from 1,484 raw rows. A small GIN performed one optimizer step and predicted an 8-by-2 batch. This verifies the cache-repair workflow; it is not a ClinTox benchmark result. All 68 Python documentation fences parsed; the 73 direct TorchDrug calls had compatible released signatures, excluding the explicitly marked negative example.

Raw lines 59 to 75
76## Source and endpoint findings
78- The released `PropertyPrediction` source supports more metrics than its
79 docstring lists, including `acc`, `mcc`, `r2`, `spearmanr`, and `pearsonr`.
80- EnzymeCommission/GO expose vector `targets`, not named scalar target keys.
81 Residue-only construction changes unknown symbols to glycine, and `to_sequence`
82 inserts dots between disconnected residues; preserve source sequence identity.
83- InfoGraph and AttributeMasking store encoders under different key prefixes.
84 `strict=False` alone cannot certify a transfer.
85- Retrosynthesis's `predict_synthon` returns one dictionary despite its stale
86 `list of dict` annotation. The composite checkpoint loader accepts one
87 subtask's exact keys at a time and rejects `strict=False` and combined states.
88- `KnowledgeGraphCompletion.num_negative` controls evaluation chunk size when
89 `full_batch_eval=False`; evaluation still ranks every entity.
90- `ordered_scaffold_split` in 0.2.1 ignores its `lengths` argument and uses
91 hardcoded 80/10/10 cutoffs. Use `scaffold_split` or a validated benchmark splitter.
93A source-based inventory covered 103 public dataset/checkpoint URLs across the
94named dataset classes and ESM models. HEAD probes are transport checks only:
9589 initially returned 200, 11 legacy DeepChem routes returned 400, FreeSolv's S3
96route returned an unresolved 301, one historical AlphaFoldDB zebrafish archive
97returned 404, and WN18RR test data timed out before a successful retry. These
98failures are not claims that the underlying datasets are retired. Large archive
99and checkpoint contents, checksums, and parsing remain unverified. No credentials,
100private queries, or authenticated endpoints are involved.

Source and endpoint findings

  • The released PropertyPrediction source supports more metrics than its docstring lists, including acc, mcc, r2, spearmanr, and pearsonr.
  • EnzymeCommission/GO expose vector targets, not named scalar target keys. Residue-only construction changes unknown symbols to glycine, and to_sequence inserts dots between disconnected residues; preserve source sequence identity.
  • InfoGraph and AttributeMasking store encoders under different key prefixes. strict=False alone cannot certify a transfer.
  • Retrosynthesis's predict_synthon returns one dictionary despite its stale list of dict annotation. The composite checkpoint loader accepts one subtask's exact keys at a time and rejects strict=False and combined states.
  • KnowledgeGraphCompletion.num_negative controls evaluation chunk size when full_batch_eval=False; evaluation still ranks every entity.
  • ordered_scaffold_split in 0.2.1 ignores its lengths argument and uses hardcoded 80/10/10 cutoffs. Use scaffold_split or a validated benchmark splitter.

A source-based inventory covered 103 public dataset/checkpoint URLs across the named dataset classes and ESM models. HEAD probes are transport checks only: 89 initially returned 200, 11 legacy DeepChem routes returned 400, FreeSolv's S3 route returned an unresolved 301, one historical AlphaFoldDB zebrafish archive returned 404, and WN18RR test data timed out before a successful retry. These failures are not claims that the underlying datasets are retired. Large archive and checkpoint contents, checksums, and parsing remain unverified. No credentials, private queries, or authenticated endpoints are involved.

Raw lines 76 to 101
102## Limits
104No CUDA/MPS, distributed training, pretrained ESM inference, full protein
105archives, USPTO training/beam search, generated-molecule quality, PPO optimization,
106or benchmark convergence was tested. Protein-structure models need verified
107coordinate/graph construction; the review does not supply a complete GearNet
108experiment. Examples involving those operations are illustrative and must pass a
109small native check in the intended environment before scaling.

Limits

No CUDA/MPS, distributed training, pretrained ESM inference, full protein archives, USPTO training/beam search, generated-molecule quality, PPO optimization, or benchmark convergence was tested. Protein-structure models need verified coordinate/graph construction; the review does not supply a complete GearNet experiment. Examples involving those operations are illustrative and must pass a small native check in the intended environment before scaling.

Raw lines 102 to 110
111## Primary sources
113- [PyPI release and dependency metadata](https://pypi.org/project/torchdrug/0.2.1/)
114- [Official release notes](https://github.com/DeepGraphLearning/torchdrug/releases/tag/v0.2.1)
115- [Official installation guide](https://torchdrug.ai/docs/installation.html)
116- [Released source tree](https://github.com/DeepGraphLearning/torchdrug/tree/v0.2.1/torchdrug)
117- [Data API](https://torchdrug.ai/docs/api/data.html)
118- [Task API](https://torchdrug.ai/docs/api/tasks.html)
119- [Model API](https://torchdrug.ai/docs/api/models.html)
120- [Engine API](https://torchdrug.ai/docs/api/core.html)
121- [DeepChem ClinTox source](https://github.com/deepchem/deepchem/blob/master/deepchem/molnet/load_function/clintox_datasets.py)
122- [PyG PyTorch 2.0 CPU wheels](https://data.pyg.org/whl/torch-2.0.0+cpu.html)
123- [uv build dependency configuration](https://docs.astral.sh/uv/concepts/projects/config/#augmenting-build-dependencies)