Documentation
Search…
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

1
logger = WandbLogger()
2
model = TorchModel(, wandb_logger=logger)
3
model.fit()
Copied!

Report & Google Colab

To read a Report with charts generated using the W&B DeepChem integration, have a look here:
Using W&B with DeepChem: Molecular Graph Convolutional Networks
W&B
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
1
!pip install wandb
2
3
import wandb
4
wandb.login()
Copied!
1
pip install wandb
2
wandb login
Copied!

2) Initialize and configure WandbLogger

1
from deepchem.models import WandbLogger
2
3
logger = WandbLogger(entity="my_entity", project="my_project")
Copied!

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
1
from deepchem.models import TorchModel, ValidationCallback
2
3
vc = ValidationCallback() # optional
4
model = TorchModel(, wandb_logger=logger)
5
model.fit(, callbacks=[vc])
6
logger.finish()
Copied!
1
from deepchem.models import KerasModel, ValidationCallback
2
3
vc = ValidationCallback() # optional
4
model = KerasModel(, wandb_logger=logger)
5
model.fit(, callbacks=[vc])
6
logger.finish()
Copied!
Last modified 3mo ago