You can use the chemicalx.pipeline function to orchestrate the training and evaluation of drug pair scoring models. The pipeline requires a dataset and a model instance. It supports various data arguments to configure feature extraction and training arguments to control the learning process. After running the pipeline, you can use the returned results object to summarize performance metrics (like AUC-ROC) or save the model and metadata to disk.
from chemicalx import pipeline
from chemicalx.models import DeepSynergy
from chemicalx.data import DrugCombDB
model = DeepSynergy(context_channels=112, drug_channels=256)
dataset = DrugCombDB()
results = pipeline(
dataset=dataset,
model=model,
# Data arguments
batch_size=5120,
context_features=True,
drug_features=True,
drug_molecules=False,
# Training arguments
epochs=100,
)
# Outputs information about the AUC-ROC, etc. to the console.
results.summarize()
# Save the model, losses, evaluation, and other metadata.
results.save("~/test_results/")