Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
ad222fb9
Unverified
Commit
ad222fb9
authored
Apr 16, 2020
by
Mufei Li
Committed by
GitHub
Apr 16, 2020
Browse files
Update (#1447)
parent
011656fd
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
11 deletions
+13
-11
apps/life_sci/README.md
apps/life_sci/README.md
+1
-1
apps/life_sci/conda/dgllife/meta.yaml
apps/life_sci/conda/dgllife/meta.yaml
+3
-3
apps/life_sci/examples/reaction_prediction/rexgen_direct/README.md
..._sci/examples/reaction_prediction/rexgen_direct/README.md
+3
-3
apps/life_sci/python/dgllife/data/csv_dataset.py
apps/life_sci/python/dgllife/data/csv_dataset.py
+1
-1
apps/life_sci/python/dgllife/libinfo.py
apps/life_sci/python/dgllife/libinfo.py
+1
-1
apps/life_sci/python/dgllife/model/gnn/wln.py
apps/life_sci/python/dgllife/model/gnn/wln.py
+2
-0
apps/life_sci/python/dgllife/model/pretrain.py
apps/life_sci/python/dgllife/model/pretrain.py
+1
-1
apps/life_sci/python/update_version.py
apps/life_sci/python/update_version.py
+1
-1
No files found.
apps/life_sci/README.md
View file @
ad222fb9
...
...
@@ -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:
...
...
apps/life_sci/conda/dgllife/meta.yaml
View file @
ad222fb9
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
:
...
...
apps/life_sci/examples/reaction_prediction/rexgen_direct/README.md
View file @
ad222fb9
...
...
@@ -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
...
...
@@ -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 | 8
6.5
|
8
9.6 | 9
1.2
|
| Easy evaluation |
88.9
| 9
2.0
| 9
3.5
|
| Hard evaluation | 8
8.8
| 9
1
.6 | 9
2.9
|
| Easy evaluation |
91.0
| 9
3.7
| 9
4.9
|
### Pre-trained Model
...
...
apps/life_sci/python/dgllife/data/csv_dataset.py
View file @
ad222fb9
...
...
@@ -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
...
...
apps/life_sci/python/dgllife/libinfo.py
View file @
ad222fb9
"""Information for the library."""
# current version
__version__
=
'0.2.
1
'
__version__
=
'0.2.
2
'
apps/life_sci/python/dgllife/model/gnn/wln.py
View file @
ad222fb9
...
...
@@ -141,6 +141,8 @@ class WLN(nn.Module):
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
)
...
...
apps/life_sci/python/dgllife/model/pretrain.py
View file @
ad222fb9
...
...
@@ -22,7 +22,7 @@ URL = {
'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
,
...
...
apps/life_sci/python/update_version.py
View file @
ad222fb9
...
...
@@ -8,7 +8,7 @@ List of affected files:
import
os
import
re
__version__
=
"0.2.
1
"
__version__
=
"0.2.
2
"
print
(
__version__
)
# Implementations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment