Getting started
Introduction
Existing biomedical benchmarks do not provide end-to-end infrastructure for training, evaluation, and inference of models that integrate multimodal biological data and a broad range of machine learning tasks in therapeutics. PyTDC unifies distributed, heterogeneous, continuously updated data sources and model weights and standardizes benchmarking and inference endpoints.
Examples on this site target pytdc-nextml 1.2.0, which installs the import package tdc_ml and requires Python 3.9 or newer. Legacy TDC docs used pip install PyTDC and from tdc …; those remain valid only for the older distribution.
Installation
pip install pytdc-nextmlOptional stacks such as PyTorch, Hugging Face Transformers, and single-cell tooling are needed only for model-server workflows, not for loading a standard ADME table.
Load a dataset
PyTDC keeps TDC’s three-tier access path: problem → ML task → dataset. To obtain the Caco-2 permeability dataset from the ADME task:
from tdc_ml.single_pred import ADME
data = ADME(name="Caco2_Wang")
df = data.get_data()
splits = data.get_split()
print(df.columns.tolist())
print(sorted(splits.keys()))
print(len(splits["train"]), len(splits["valid"]), len(splits["test"]))df is a pandas DataFrame. get_split() returns keys train, valid, and test (not val). This example is syntax-checked against pytdc-nextml 1.2.0. Running it downloads data from Harvard Dataverse; successful numeric output is not invented here.
Evaluate predictions
Metrics live on tdc_ml.Evaluator. A self-contained check that does not download data:
from tdc_ml import Evaluator
evaluator = Evaluator(name="MSE")
score = evaluator([0.8, 0.7], [0.75, 0.73])
print(score)