Skip to content

Commit

Permalink
Update (dmlc#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeili authored Apr 15, 2020
1 parent 011656f commit ad222fb
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/life_sci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Once you have installed the package, you can verify the success of installation
import dgllife

print(dgllife.__version__)
# 0.2.1
# 0.2.2
```

If you are new to DGL, the first time you import dgl a message will pop up as below:
Expand Down
6 changes: 3 additions & 3 deletions apps/life_sci/conda/dgllife/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: dgllife{{ environ.get('APP_PACKAGE_SUFFIX', '') }}
version: "0.2.1"
version: "0.2.2"

source:
url: https://files.pythonhosted.org/packages/7d/ca/543802eca0e8d263a73309379f79a054b3bb7e7377ead0b69d2451728465/dgllife-0.2.1.tar.gz
sha256: 11a1622ba587f7ff67f42ad8bc88d238faaa459ab554cf59e1b69a10079d41c0
url: https://files.pythonhosted.org/packages/19/e7/7d9890c7ddb303613f8a9c0bafafa40239e65f9c0698e699f19f577412fc/dgllife-0.2.2.tar.gz
sha256: 812a93d54cd5c049a7368aae01d53b5a4a12ca2d0e4e57d74fa4a844a1c01d92

requirements:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ By default, we store the model per 10000 iterations in `center_results`.
**Speedup**: For an epoch of training, our implementation takes about 5095s for the first epoch while the authors'
implementation takes about 11657s, which is roughly a speedup by 2.3x.

For model evaluation, we can choose whether to exclude reactants not contributing atoms to the product
For model evaluation, we can choose whether to exclude reactants not contributing heavy atoms to the product
(e.g. reagents and solvents) in top-k atom pair selection, which will make the task easier.
For the easier evaluation, do

Expand All @@ -64,8 +64,8 @@ A summary of the model performance is as follows:
| Item | Top 6 accuracy | Top 8 accuracy | Top 10 accuracy |
| --------------- | -------------- | -------------- | --------------- |
| Paper | 89.8 | 92.0 | 93.3 |
| Hard evaluation | 86.5 | 89.6 | 91.2 |
| Easy evaluation | 88.9 | 92.0 | 93.5 |
| Hard evaluation | 88.8 | 91.6 | 92.9 |
| Easy evaluation | 91.0 | 93.7 | 94.9 |

### Pre-trained Model

Expand Down
2 changes: 1 addition & 1 deletion apps/life_sci/python/dgllife/data/csv_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MoleculeCSVDataset(object):
Featurization for edges like bonds in a molecule, which can be used to update
edata for a DGLGraph.
smiles_column: str
Column name that including smiles in ``df``.
Column name for smiles in ``df``.
cache_file_path: str
Path to store the preprocessed DGLGraphs. For example, this can be ``'dglgraph.bin'``.
task_names : list of str or None
Expand Down
2 changes: 1 addition & 1 deletion apps/life_sci/python/dgllife/libinfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Information for the library."""

# current version
__version__ = '0.2.1'
__version__ = '0.2.2'
2 changes: 2 additions & 0 deletions apps/life_sci/python/dgllife/model/gnn/wln.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ def forward(self, g, node_feats, edge_feats):
concat_edge_feats = torch.cat([g.edata['he_src'], edge_feats], dim=1)
g.edata['he'] = self.project_concatenated_messages(concat_edge_feats)
g.update_all(fn.copy_edge('he', 'm'), fn.sum('m', 'hv_new'))
node_feats = self.get_new_node_feats(
torch.cat([node_feats, g.ndata['hv_new']], dim=1))

g = g.local_var()
g.ndata['hv'] = self.project_node_messages(node_feats)
Expand Down
2 changes: 1 addition & 1 deletion apps/life_sci/python/dgllife/model/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'DGMG_ZINC_canonical': 'pre_trained/dgmg_ZINC_canonical.pth',
'DGMG_ZINC_random': 'pre_trained/dgmg_ZINC_random.pth',
'JTNN_ZINC': 'pre_trained/JTNN_ZINC.pth',
'wln_center_uspto': 'dgllife/pre_trained/wln_center_uspto.pth'
'wln_center_uspto': 'dgllife/pre_trained/wln_center_uspto_v2.pth'
}

def download_and_load_checkpoint(model_name, model, model_postfix,
Expand Down
2 changes: 1 addition & 1 deletion apps/life_sci/python/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import re

__version__ = "0.2.1"
__version__ = "0.2.2"
print(__version__)

# Implementations
Expand Down

0 comments on commit ad222fb

Please sign in to comment.