Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
e9f137f0
Unverified
Commit
e9f137f0
authored
Feb 09, 2020
by
QuanluZhang
Committed by
GitHub
Feb 09, 2020
Browse files
merge from master (#2019)
parent
f7cf3ea5
Changes
107
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
241 additions
and
40 deletions
+241
-40
docs/zh_CN/conf.py
docs/zh_CN/conf.py
+4
-1
docs/zh_CN/examples.rst
docs/zh_CN/examples.rst
+2
-0
docs/zh_CN/model_compression.rst
docs/zh_CN/model_compression.rst
+1
-1
docs/zh_CN/nas.rst
docs/zh_CN/nas.rst
+3
-1
docs/zh_CN/training_services.rst
docs/zh_CN/training_services.rst
+1
-0
examples/feature_engineering/auto-feature-engineering/README_zh_CN.md
...ture_engineering/auto-feature-engineering/README_zh_CN.md
+4
-5
examples/trials/auto-gbdt/config_pai.yml
examples/trials/auto-gbdt/config_pai.yml
+5
-2
examples/trials/auto-gbdt/config_paiYarn.yml
examples/trials/auto-gbdt/config_paiYarn.yml
+32
-0
examples/trials/cifar10_pytorch/config_pai.yml
examples/trials/cifar10_pytorch/config_pai.yml
+5
-2
examples/trials/cifar10_pytorch/config_paiYarn.yml
examples/trials/cifar10_pytorch/config_paiYarn.yml
+32
-0
examples/trials/efficientnet/README_zh_CN.md
examples/trials/efficientnet/README_zh_CN.md
+1
-19
examples/trials/efficientnet/config_pai.yml
examples/trials/efficientnet/config_pai.yml
+4
-1
examples/trials/efficientnet/config_paiYarn.yml
examples/trials/efficientnet/config_paiYarn.yml
+28
-0
examples/trials/ga_squad/config_pai.yml
examples/trials/ga_squad/config_pai.yml
+5
-2
examples/trials/ga_squad/config_paiYarn.yml
examples/trials/ga_squad/config_paiYarn.yml
+32
-0
examples/trials/mnist-advisor/config_pai.yml
examples/trials/mnist-advisor/config_pai.yml
+5
-2
examples/trials/mnist-advisor/config_paiYarn.yml
examples/trials/mnist-advisor/config_paiYarn.yml
+36
-0
examples/trials/mnist-annotation/config_pai.yml
examples/trials/mnist-annotation/config_pai.yml
+5
-2
examples/trials/mnist-annotation/config_paiYarn.yml
examples/trials/mnist-annotation/config_paiYarn.yml
+31
-0
examples/trials/mnist-batch-tune-keras/config_pai.yml
examples/trials/mnist-batch-tune-keras/config_pai.yml
+5
-2
No files found.
docs/zh_CN/conf.py
View file @
e9f137f0
...
...
@@ -47,6 +47,9 @@ extensions = [
'sphinx.ext.napoleon'
,
]
# 添加示例模块
autodoc_mock_imports
=
[
'apex'
]
# Add any paths that contain templates here, relative to this directory.
templates_path
=
[
'_templates'
]
...
...
@@ -72,7 +75,7 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns
=
[
'_build'
,
'Thumbs.db'
,
'.DS_Store'
]
exclude_patterns
=
[
'_build'
,
'Thumbs.db'
,
'.DS_Store'
,
'Release_v1.0.md'
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
None
...
...
docs/zh_CN/examples.rst
View file @
e9f137f0
...
...
@@ -11,3 +11,5 @@
EvolutionSQuAD<./TrialExample/SquadEvolutionExamples>
GBDT<./TrialExample/GbdtExample>
RocksDB <./TrialExample/RocksdbExamples>
KD 示例 <./TrialExample/KDExample>
EfficientNet <./TrialExample/EfficientNet>
docs/zh_CN/model_compression.rst
View file @
e9f137f0
...
...
@@ -18,7 +18,7 @@ NNI 中也内置了一些流程的模型压缩算法。
概述 <Compressor/Overview>
Level Pruner <Compressor/Pruner>
AGP Pruner <Compressor/Pruner>
L1Filter Pruner <Compressor/
L1F
ilter
P
runer>
L1Filter Pruner <Compressor/
l1f
ilter
p
runer>
Slim Pruner <Compressor/SlimPruner>
Lottery Ticket Pruner <Compressor/LotteryTicketHypothesis>
FPGM Pruner <Compressor/Pruner>
...
...
docs/zh_CN/nas.rst
View file @
e9f137f0
...
...
@@ -22,4 +22,6 @@ NAS 算法
NAS 接口 <NAS/NasInterface>
ENAS <NAS/ENAS>
DARTS <NAS/DARTS>
P-DARTS <NAS/Overview>
P-DARTS <NAS/PDARTS>
SPOS <NAS/SPOS>
CDARTS <NAS/CDARTS>
docs/zh_CN/training_services.rst
View file @
e9f137f0
...
...
@@ -6,5 +6,6 @@ NNI 支持的训练平台介绍
本机<./TrainingService/LocalMode>
远程<./TrainingService/RemoteMachineMode>
OpenPAI<./TrainingService/PaiMode>
OpenPAI Yarn 模式<./TrainingService/PaiYarnMode>
Kubeflow<./TrainingService/KubeflowMode>
FrameworkController<./TrainingService/FrameworkControllerMode>
examples/feature_engineering/auto-feature-engineering/README_zh_CN.md
View file @
e9f137f0
**NNI 中的自动特征工程**
===
**NNI 中的自动特征工程**
===
此
[
示例
](
https://github.com/SpongebBob/tabular_automl_NNI
)
在 NNI 中实现了自动特征工程。
此
[
示例
](
https://github.com/SpongebBob/tabular_automl_NNI
)
在 NNI 中实现了自动特征工程。
代码来自于贡献者。 谢谢可爱的贡献者!
代码来自于贡献者。 谢谢可爱的贡献者!
欢迎越来越多的人加入我们!
\ No newline at end of file
欢迎越来越多的人加入我们!
examples/trials/auto-gbdt/config_pai.yml
View file @
e9f137f0
...
...
@@ -23,10 +23,13 @@ trial:
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
\ No newline at end of file
examples/trials/auto-gbdt/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
default
experimentName
:
example_auto-gbdt
trialConcurrency
:
1
maxExecDuration
:
10h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
paiYarn
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
minimize
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
0
cpuNum
:
1
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
paiYarnConfig
:
#The username to login pai
userName
:
username
#The password to login pai
passWord
:
password
#The host of restful server of pai
host
:
10.10.10.10
\ No newline at end of file
examples/trials/cifar10_pytorch/config_pai.yml
View file @
e9f137f0
...
...
@@ -23,10 +23,13 @@ trial:
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/cifar10_pytorch/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
default
experimentName
:
example_pytorch_cifar10
trialConcurrency
:
1
maxExecDuration
:
100h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
paiYarn
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
1
cpuNum
:
1
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
paiYarnConfig
:
#The username to login pai
userName
:
username
#The password to login pai
passWord
:
password
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/efficientnet/README_zh_CN.md
View file @
e9f137f0
# EfficientNet
[
EfficientNet: 重新思考卷积神经网络的模型尺度
](
https://arxiv.org/abs/1905.11946
)
这里提供了:使用遍历搜索为 EfficientNet-B1 找到最佳元组(alpha,beta,gamma)的搜索空间和 Tuner。参考
[
论文
](
https://arxiv.org/abs/1905.11946
)
3.3。
## 说明
1.
设置此目录为当前目录。
2.
运行
`git clone https://github.com/ultmaster/EfficientNet-PyTorch`
来 clone 修改过的
[
EfficientNet-PyTorch
](
https://github.com/lukemelas/EfficientNet-PyTorch
)
。 修改尽可能接近原始的
[
TensorFlow 版本
](
https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet
)
(包括 EMA,标记平滑度等等。);另外添加了代码从 Tuner 获取参数并回调中间和最终结果。 将其 clone 至
`EfficientNet-PyTorch`
;
`main.py`
,
`train_imagenet.sh`
等文件会在配置文件中指定的路径。
3.
运行
`nnictl create --config config_net.yml`
来找到最好的 EfficientNet-B1。 根据环境来调整训练平台(OpenPAI、本机、远程),batch size。
在 ImageNet 上的训练,可阅读
`EfficientNet-PyTorch/train_imagenet.sh`
。 下载 ImageNet,并参考
[
PyTorch 格式
](
https://pytorch.org/docs/stable/torchvision/datasets.html#imagenet
)
来解压,然后将
`/mnt/data/imagenet`
替换为 ImageNet 的路径。 此文件也是如何将 ImageNet 挂载到 OpenPAI 容器的示例。
## 结果
下图展示了 acc@1 和 alpha、beta、gamma 之间的关系。

\ No newline at end of file
[
文档
](
https://nni.readthedocs.io/en/latest/TrialExample/EfficientNet.html
)
\ No newline at end of file
examples/trials/efficientnet/config_pai.yml
View file @
e9f137f0
...
...
@@ -21,8 +21,11 @@ trial:
gpuNum
:
1
virtualCluster
:
nni
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
nniManagerIp
:
<nni_manager_ip>
paiConfig
:
userName
:
<username>
passWord
:
<password
>
token
:
<token
>
host
:
<host>
examples/trials/efficientnet/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
unknown
experimentName
:
example_efficient_net
trialConcurrency
:
8
maxExecDuration
:
48h
maxTrialNum
:
100
trainingServicePlatform
:
paiYarn
searchSpacePath
:
search_net.json
useAnnotation
:
false
tuner
:
codeDir
:
.
classFileName
:
tuner.py
className
:
FixedProductTuner
classArgs
:
product
:
2
trial
:
codeDir
:
EfficientNet-PyTorch
command
:
sh train_imagenet.sh
cpuNum
:
4
memoryMB
:
25000
shmMB
:
25000
gpuNum
:
1
virtualCluster
:
nni
image
:
msranni/nni:latest
nniManagerIp
:
<nni_manager_ip>
paiYarnConfig
:
userName
:
<username>
passWord
:
<password>
host
:
<host>
examples/trials/ga_squad/config_pai.yml
View file @
e9f137f0
...
...
@@ -23,10 +23,13 @@ trial:
memoryMB
:
32869
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/ga_squad/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
default
experimentName
:
example_ga_squad
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
paiYarn
#choice: true, false
useAnnotation
:
false
#Your nni_manager ip
nniManagerIp
:
10.10.10.10
tuner
:
codeDir
:
../../tuners/ga_customer_tuner
classFileName
:
customer_tuner.py
className
:
CustomerTuner
classArgs
:
optimize_mode
:
maximize
trial
:
command
:
chmod +x ./download.sh && ./download.sh && python3 trial.py
codeDir
:
.
gpuNum
:
0
cpuNum
:
1
memoryMB
:
32869
#The docker image to run nni job on pai
image
:
msranni/nni:latest
paiYarnConfig
:
#The username to login pai
userName
:
username
#The password to login pai
passWord
:
password
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/mnist-advisor/config_pai.yml
View file @
e9f137f0
...
...
@@ -27,10 +27,13 @@ trial:
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/mnist-advisor/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
default
experimentName
:
example_mnist_hyperband
maxExecDuration
:
1h
maxTrialNum
:
10000
trialConcurrency
:
10
#choice: local, remote, pai
trainingServicePlatform
:
paiYarn
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
advisor
:
#choice: Hyperband, BOHB
#(BOHB should be installed through nnictl)
builtinAdvisorName
:
Hyperband
classArgs
:
#R: the maximum trial budget
R
:
100
#eta: proportion of discarded trials
eta
:
3
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 mnist.py
codeDir
:
.
gpuNum
:
0
cpuNum
:
1
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
paiYarnConfig
:
#The username to login pai
userName
:
username
#The password to login pai
passWord
:
password
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/mnist-annotation/config_pai.yml
View file @
e9f137f0
...
...
@@ -22,10 +22,13 @@ trial:
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
\ No newline at end of file
examples/trials/mnist-annotation/config_paiYarn.yml
0 → 100644
View file @
e9f137f0
authorName
:
default
experimentName
:
example_mnist
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
paiYarn
#choice: true, false
useAnnotation
:
true
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 mnist.py
codeDir
:
.
gpuNum
:
0
cpuNum
:
1
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
paiYarnConfig
:
#The username to login pai
userName
:
username
#The password to login pai
passWord
:
password
#The host of restful server of pai
host
:
10.10.10.10
\ No newline at end of file
examples/trials/mnist-batch-tune-keras/config_pai.yml
View file @
e9f137f0
...
...
@@ -20,10 +20,13 @@ trial:
memoryMB
:
8196
#The docker image to run nni job on pai
image
:
msranni/nni:latest
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStoragePlugin
:
team_wise
paiConfig
:
#The username to login pai
userName
:
username
#The
password
to login pai
passWord
:
password
#The
token
to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
Prev
1
2
3
4
5
6
Next
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