<jupyter_start><jupyter_text><jupyter_code>!curl -Lo conda_installer.py https://raw.githubusercontent.com/deepchem/deepchem/master/scripts/colab_install.py
import conda_installer
conda_installer.install()
!/root/miniconda/bin/conda info -e<jupyter_output>% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  3501  100  3501    0     0   131k      0 --:--:-- --:--:-- --:--:--  131k<jupyter_text>!pip install --pre deepchem<jupyter_code>import deepchem as dc
dc.__version__
tasks, datasets, transformers = dc.molnet.load_delaney(featurizer='GraphConv') 
train_dataset, valid_dataset, test_dataset = datasets
model = dc.models.GraphConvModel(n_tasks=1, mode='regression', dropout=0.2)
model.fit(train_dataset, nb_epoch=100)
metric = dc.metrics.Metric(dc.metrics.pearson_r2_score)
print("Training set score:", model.evaluate(train_dataset, [metric], transformers))
print("Test set score:", model.evaluate(test_dataset, [metric], transformers))
solubilities = model.predict_on_batch(test_dataset.X[:10])
for molecule, solubility, test_solubility in zip(test_dataset.ids, solubilities, test_dataset.y):
  print(solubility, test_solubility, molecule)<jupyter_output>[-1.9195036] [-1.60114461] c1cc2ccc3cccc4ccc(c1)c2c34
[0.805398] [0.20848251] Cc1cc(=O)[nH]c(=S)[nH]1
[-1.0408298] [-0.01602738] Oc1ccc(cc1)C2(OC(=O)c3ccccc23)c4ccc(O)cc4 
[-2.254894] [-2.82191713] c1ccc2c(c1)cc3ccc4cccc5ccc2c3c45
[-1.6380891] [-0.52891635] C1=Cc2cccc3cccc1c23
[2.4569871] [1.10168349] CC1CO1
[0.16973475] [-0.88987406] CCN2c1ccccc1N(C)C(=S)c3cccnc23 
[-1.0493064] [-0.52649706] CC12CCC3C(CCc4cc(O)ccc34)C2CCC1=O
[-0.52131784] [-0.76358725] Cn2cc(c1ccccc1)c(=O)c(c2)c3cccc(c3)C(F)(F)F
[0.22966522] [-0.64020358] ClC(Cl)(Cl)C(NC=O)N1C=CN(C=C1)C(NC=O)C(Cl)(Cl)Cl<jupyter_text>Tutorial 2: Working With Datasets¶<jupyter_code>print(test_dataset)<jupyter_output><DiskDataset X.shape: (113,), y.shape: (113, 1), w.shape: (113, 1), ids: ['c1cc2ccc3cccc4ccc(c1)c2c34' 'Cc1cc(=O)[nH]c(=S)[nH]1'
 'Oc1ccc(cc1)C2(OC(=O)c3ccccc23)c4ccc(O)cc4 ' ...
 'c1ccc2c(c1)ccc3c2ccc4c5ccccc5ccc43' 'Cc1occc1C(=O)Nc2ccccc2'
 'OCC3OC(OCC2OC(OC(C#N)c1ccccc1)C(O)C(O)C2O)C(O)C(O)C3O '], task_names: ['measured log solubility in mols per litre']>
{'fraction_non_alphanumeric': 0.172544080604534, 'fraction_numerical': 0.1343408900083963, 'mean_word_length': 5.0636132315521625, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '526209', 'license': 'MIT', 'n_tokens_mistral': 1250, 'n_tokens_neox': 1080, 'n_words': 147, 'path': 'deepchem_install.ipynb', 'repo_name': 'yinzi5931/numpy-100', 'size': '2382'}