DeepChem
2 minute read
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(…)
![](https://docs.wandb.ai/images/integrations/cd.png)
Report and Google Colab
Explore the Using W&B with DeepChem: Molecular Graph Convolutional Networks article for an example charts generated using the W&B DeepChem integration.
To dive straight into working code, check out this Google Colab.
Track experiments
Set up W&B for DeepChem models of type KerasModel or TorchModel.
Sign up and create an API key
An API key authenticates your machine to W&B. You can generate an API key from your user profile.
- Click your user profile icon in the upper right corner.
- Select User Settings, then scroll to the API Keys section.
- Click Reveal. Copy the displayed API key. To hide the API key, reload the page.
Install the wandb
library and log in
To install the wandb
library locally and log in:
-
Set the
WANDB_API_KEY
environment variable to your API key.export WANDB_API_KEY=<your_api_key>
-
Install the
wandb
library and log in.pip install wandb wandb login
pip install wandb
import wandb
wandb.login()
!pip install wandb
import wandb
wandb.login()
Log your training and evaluation data to W&B
Training loss and evaluation metrics can be automatically logged to W&B. Optional evaluation can be enabled using the DeepChem ValidationCallback, the WandbLogger
will detect ValidationCallback callback and log the metrics generated.
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()
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.