Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PGL
提交
c5382b8d
P
PGL
项目概览
PaddlePaddle
/
PGL
通知
76
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
11
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PGL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
11
Issue
11
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
c5382b8d
编写于
4月 27, 2020
作者:
Webbley
提交者:
GitHub
4月 27, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #55 from Liwb5/develop
update mol task for ogb
上级
401f6d69
407b09f7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
10 deletion
+15
-10
ogb_examples/graphproppred/mol/README.md
ogb_examples/graphproppred/mol/README.md
+9
-4
ogb_examples/graphproppred/mol/args.py
ogb_examples/graphproppred/mol/args.py
+1
-1
ogb_examples/graphproppred/mol/hiv_config.yaml
ogb_examples/graphproppred/mol/hiv_config.yaml
+0
-1
ogb_examples/graphproppred/mol/main.py
ogb_examples/graphproppred/mol/main.py
+5
-3
ogb_examples/graphproppred/mol/pcba_config.yaml
ogb_examples/graphproppred/mol/pcba_config.yaml
+0
-1
未找到文件。
ogb_examples/graphproppred/mol/README.md
浏览文件 @
c5382b8d
...
...
@@ -18,11 +18,16 @@ python setup.py install
### How to run
For example, use GPU to train model on ogbg-molhiv dataset and ogb-molpcba dataset.
```
export CUDA_VISIBLE_DEVICES=1
python -u main.py --config hiv_config.yaml
CUDA_VISIBLE_DEVICES=1 python -u main.py --config hiv_config.yaml --use_cuda
export CUDA_VISIBLE_DEVICES=2
python -u main.py --config pcba_config.yaml
CUDA_VISIBLE_DEVICES=2 python -u main.py --config pcba_config.yaml --use_cuda
```
If you want to use CPU to train model, environment variables
`CPU_NUM`
should be specified and should be in the range of 1 to N, where N is the total CPU number on your machine.
```
CPU_NUM=1 python -u main.py --config hiv_config.yaml
CPU_NUM=1 python -u main.py --config pcba_config.yaml
```
### Experiment results
...
...
ogb_examples/graphproppred/mol/args.py
浏览文件 @
c5382b8d
...
...
@@ -25,6 +25,7 @@ from utils.args import ArgumentGroup
# yapf: disable
parser
=
argparse
.
ArgumentParser
(
__doc__
)
parser
.
add_argument
(
'--use_cuda'
,
action
=
'store_true'
)
model_g
=
ArgumentGroup
(
parser
,
"model"
,
"model configuration and paths."
)
model_g
.
add_arg
(
"init_checkpoint"
,
str
,
None
,
"Init checkpoint to resume training from."
)
model_g
.
add_arg
(
"init_pretraining_params"
,
str
,
None
,
...
...
@@ -80,7 +81,6 @@ data_g.add_arg("random_seed", int, None, "Random seed.")
data_g
.
add_arg
(
"buf_size"
,
int
,
1000
,
"Random seed."
)
run_type_g
=
ArgumentGroup
(
parser
,
"run_type"
,
"running type options."
)
run_type_g
.
add_arg
(
"use_cuda"
,
bool
,
False
,
"If set, use GPU for training."
)
run_type_g
.
add_arg
(
"num_iteration_per_drop_scope"
,
int
,
10
,
"Iteration intervals to drop scope."
)
run_type_g
.
add_arg
(
"do_train"
,
bool
,
True
,
"Whether to perform training."
)
run_type_g
.
add_arg
(
"do_val"
,
bool
,
True
,
"Whether to perform evaluation on dev data set."
)
...
...
ogb_examples/graphproppred/mol/hiv_config.yaml
浏览文件 @
c5382b8d
task_name
:
hiv
use_cuda
:
True
seed
:
15391
dataset_name
:
ogbg-molhiv
eval_metrics
:
null
...
...
ogb_examples/graphproppred/mol/main.py
浏览文件 @
c5382b8d
...
...
@@ -171,8 +171,10 @@ def main(args):
if
__name__
==
"__main__"
:
args
=
parser
.
parse_args
()
if
args
.
config
is
not
None
:
args
=
Config
(
args
.
config
,
isCreate
=
True
,
isSave
=
True
)
config
=
Config
(
args
.
config
,
isCreate
=
True
,
isSave
=
True
)
log
.
info
(
args
)
config
[
'use_cuda'
]
=
args
.
use_cuda
main
(
args
)
log
.
info
(
config
)
main
(
config
)
ogb_examples/graphproppred/mol/pcba_config.yaml
浏览文件 @
c5382b8d
task_name
:
pcba
use_cuda
:
True
seed
:
28994
dataset_name
:
ogbg-molpcba
eval_metrics
:
null
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录