Documentation
English
Search…
⌃K

DeepChem

The DeepChem library provides open source tools that democratize the use of deep-learning in drug discovery, materials science, chemistry, and biology. This W&B integration adds simple and easy-to-use experiment tracking and model checkpointing while training models using DeepChem.

🧪 DeepChem logging in 3 lines of code

logger = WandbLogger()
model = TorchModel(, wandb_logger=logger)
model.fit()

Report & Google Colab

To read a Report with charts generated using the W&B DeepChem integration, have a look here:
If you'd rather dive straight into working code, check out this Google Colab.

Getting started: track experiments

Setup Weights & Biases for DeepChem models of type KerasModel or TorchModel.

1) Install the wandb library and log in

Notebook
Command Line
!pip install wandb
import wandb
wandb.login()
pip install wandb
wandb login

2) Initialize and configure WandbLogger

from deepchem.models import WandbLogger
logger = WandbLogger(entity="my_entity", project="my_project")

3) Log your training and evaluation data to W&B

Training loss and evaluation metrics can be automatically logged to Weights & Biases. Optional evaluation can be enabled using the DeepChem ValidationCallback, the WandbLogger will detect ValidationCallback callback and log the metrics generated.
TorchModel
KerasModel
from deepchem.models import TorchModel, ValidationCallback
vc = ValidationCallback() # optional
model = TorchModel(, wandb_logger=logger)
model.fit(, callbacks=[vc])
logger.finish()
from deepchem.models import KerasModel, ValidationCallback
vc = ValidationCallback() # optional
model = KerasModel(, wandb_logger=logger)
model.fit(, callbacks=[vc])
logger.finish()
Last modified 9mo ago