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
nni
Commits
eb65bc32
Unverified
Commit
eb65bc32
authored
Jun 08, 2021
by
liuzhe-lz
Committed by
GitHub
Jun 08, 2021
Browse files
Port trial examples' config file to v2 (#3721)
Co-authored-by:
liuzhe
<
zhe.liu@microsoft.com
>
parent
c4d449c5
Changes
67
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
138 additions
and
367 deletions
+138
-367
examples/trials/auto-gbdt/config.yml
examples/trials/auto-gbdt/config.yml
+6
-17
examples/trials/auto-gbdt/config_metis.yml
examples/trials/auto-gbdt/config_metis.yml
+18
-17
examples/trials/auto-gbdt/config_pai.yml
examples/trials/auto-gbdt/config_pai.yml
+0
-35
examples/trials/auto-gbdt/search_space.json
examples/trials/auto-gbdt/search_space.json
+17
-5
examples/trials/auto-gbdt/search_space_metis.json
examples/trials/auto-gbdt/search_space_metis.json
+0
-5
examples/trials/benchmarking/hyperband/config_hyperband.yml
examples/trials/benchmarking/hyperband/config_hyperband.yml
+11
-18
examples/trials/cifar10_pytorch/config.yml
examples/trials/cifar10_pytorch/config.yml
+10
-19
examples/trials/cifar10_pytorch/config_pai.yml
examples/trials/cifar10_pytorch/config_pai.yml
+0
-35
examples/trials/cifar10_pytorch/search_space.json
examples/trials/cifar10_pytorch/search_space.json
+12
-3
examples/trials/efficientnet/config.yml
examples/trials/efficientnet/config.yml
+15
-0
examples/trials/efficientnet/config_local.yml
examples/trials/efficientnet/config_local.yml
+0
-18
examples/trials/efficientnet/config_pai.yml
examples/trials/efficientnet/config_pai.yml
+0
-31
examples/trials/efficientnet/tuner.py
examples/trials/efficientnet/tuner.py
+1
-1
examples/trials/ga_squad/config.yml
examples/trials/ga_squad/config.yml
+9
-15
examples/trials/ga_squad/config_pai.yml
examples/trials/ga_squad/config_pai.yml
+0
-35
examples/trials/kaggle-tgs-salt/config.yml
examples/trials/kaggle-tgs-salt/config.yml
+7
-16
examples/trials/mnist-advisor/config_bohb.yml
examples/trials/mnist-advisor/config_bohb.yml
+11
-16
examples/trials/mnist-advisor/config_hyperband.yml
examples/trials/mnist-advisor/config_hyperband.yml
+13
-24
examples/trials/mnist-advisor/config_pai.yml
examples/trials/mnist-advisor/config_pai.yml
+0
-41
examples/trials/mnist-annotation/config.yml
examples/trials/mnist-annotation/config.yml
+8
-16
No files found.
examples/trials/auto-gbdt/config.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_auto-gbdt
searchSpaceFile
:
search_space.json
trialCommand
:
python3 main.py
trialConcurrency
:
1
maxExecDuration
:
10h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
maxTrialNumber
:
10
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
name
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
minimize
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
0
\ No newline at end of file
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
examples/trials/auto-gbdt/config_metis.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_auto-gbdt-metis
# The search space of Metis tuner is slightly different from TPE and others.
# See Metis tuner' doc for details: https://nni.readthedocs.io/en/stable/Tuner/MetisTuner.html
searchSpace
:
num_leaves
:
_type
:
choice
_value
:
[
31
,
28
,
24
,
20
]
learning_rate
:
_type
:
choice
_value
:
[
0.01
,
0.05
,
0.1
,
0.2
]
bagging_freq
:
_type
:
choice
_value
:
[
1
,
2
,
4
,
8
,
10
]
trialCommand
:
python3 main.py
trialConcurrency
:
1
maxExecDuration
:
10h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space_metis.json
#choice: true, false
useAnnotation
:
false
maxTrialNumber
:
10
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner, GPTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
MetisTuner
name
:
MetisTuner
classArgs
:
#choice: maximize, minimize
optimize_mode
:
minimize
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
0
trainingService
:
platform
:
local
examples/trials/auto-gbdt/config_pai.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
default
experimentName
:
example_auto-gbdt
trialConcurrency
:
1
maxExecDuration
:
10h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
pai
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
nniManagerNFSMountPath
:
{
replace_to_your_nfs_mount_path
}
containerNFSMountPath
:
{
replace_to_your_container_mount_path
}
paiStorageConfigName
:
{
replace_to_your_storage_config_name
}
paiConfig
:
#The username to login pai
userName
:
username
#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/search_space.json
View file @
eb65bc32
{
"num_leaves"
:{
"_type"
:
"randint"
,
"_value"
:[
20
,
31
]},
"learning_rate"
:{
"_type"
:
"choice"
,
"_value"
:[
0.01
,
0.05
,
0.1
,
0.2
]},
"bagging_fraction"
:{
"_type"
:
"uniform"
,
"_value"
:[
0.7
,
1.0
]},
"bagging_freq"
:{
"_type"
:
"choice"
,
"_value"
:[
1
,
2
,
4
,
8
,
10
]}
"num_leaves"
:
{
"_type"
:
"randint"
,
"_value"
:
[
20
,
31
]
},
"learning_rate"
:
{
"_type"
:
"choice"
,
"_value"
:
[
0.01
,
0.05
,
0.1
,
0.2
]
},
"bagging_fraction"
:
{
"_type"
:
"uniform"
,
"_value"
:
[
0.7
,
1.0
]
},
"bagging_freq"
:
{
"_type"
:
"choice"
,
"_value"
:
[
1
,
2
,
4
,
8
,
10
]
}
}
examples/trials/auto-gbdt/search_space_metis.json
deleted
100644 → 0
View file @
c4d449c5
{
"num_leaves"
:{
"_type"
:
"choice"
,
"_value"
:[
31
,
28
,
24
,
20
]},
"learning_rate"
:{
"_type"
:
"choice"
,
"_value"
:[
0.01
,
0.05
,
0.1
,
0.2
]},
"bagging_freq"
:{
"_type"
:
"choice"
,
"_value"
:[
1
,
2
,
4
,
8
,
10
]}
}
examples/trials/benchmarking/hyperband/config_hyperband.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_mnist_hyperband
trialConcurrency
:
2
maxExecDuration
:
100h
maxTrialNum
:
10000
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
advisor
:
#choice: Hyperband, BOHB
builtinAdvisorName
:
Hyperband
name
:
Hyperband
classArgs
:
optimize_mode
:
maximize
#R: the maximum trial budget (could be the number of mini-batches or epochs) can be
# allocated to a trial. Each trial should use trial budget to control how long it runs.
R
:
60
#eta: proportion of discarded trials
eta
:
3
#choice: maximize, minimize
optimize_mode
:
maximize
#choice: serial, parallelism
exec_mode
:
serial
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
0
searchSpaceFile
:
search_space.json
trialCommand
:
python3 main.py
trialConcurrency
:
10
trainingService
:
platform
:
local
examples/trials/cifar10_pytorch/config.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_pytorch_cifar10
searchSpaceFile
:
search_space.json
trialCommand
:
python3 main.py
trialGpuNumber
:
1
trialConcurrency
:
4
maxExecDuration
:
100h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
maxTrialNumber
:
10
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
name
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 main.py
codeDir
:
.
gpuNum
:
1
localConfig
:
maxTrialNumPerGpu
:
2
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
maxTrialNumberPerGpu
:
2
useActiveGpu
:
false
# NOTE: Use "true" if you are using an OS with graphical interface (e.g. Windows 10, Ubuntu desktop)
# Check the doc for details: https://nni.readthedocs.io/en/latest/reference/experiment_config.html#useactivegpu
examples/trials/cifar10_pytorch/config_pai.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
default
experimentName
:
example_pytorch_cifar10
trialConcurrency
:
1
maxExecDuration
:
100h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
pai
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
nniManagerNFSMountPath
:
{
replace_to_your_nfs_mount_path
}
containerNFSMountPath
:
{
replace_to_your_container_mount_path
}
paiStorageConfigName
:
{
replace_to_your_storage_config_name
}
paiConfig
:
#The username to login pai
userName
:
username
#The token to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/cifar10_pytorch/search_space.json
View file @
eb65bc32
{
"lr"
:{
"_type"
:
"choice"
,
"_value"
:[
0.1
,
0.01
,
0.001
,
0.0001
]},
"optimizer"
:{
"_type"
:
"choice"
,
"_value"
:[
"SGD"
,
"Adadelta"
,
"Adagrad"
,
"Adam"
,
"Adamax"
]},
"model"
:{
"_type"
:
"choice"
,
"_value"
:[
"vgg"
,
"resnet18"
,
"googlenet"
,
"densenet121"
,
"mobilenet"
,
"dpn92"
,
"senet18"
]}
"lr"
:
{
"_type"
:
"choice"
,
"_value"
:
[
0.1
,
0.01
,
0.001
,
0.0001
]
},
"optimizer"
:
{
"_type"
:
"choice"
,
"_value"
:
[
"SGD"
,
"Adadelta"
,
"Adagrad"
,
"Adam"
,
"Adamax"
]
},
"model"
:
{
"_type"
:
"choice"
,
"_value"
:
[
"vgg"
,
"resnet18"
,
"googlenet"
,
"densenet121"
,
"mobilenet"
,
"dpn92"
,
"senet18"
]
}
}
examples/trials/efficientnet/config.yml
0 → 100644
View file @
eb65bc32
searchSpaceFile
:
search_net.json
trialCodeDirectory
:
EfficientNet-PyTorch
trialCommand
:
python3 main.py /data/imagenet -j 12 -a efficientnet --batch-size 48 --lr 0.048 --wd 1e-5 --epochs 5 --request-from-nni
trialGpuNumber
:
1
trialConcurrency
:
4
maxTrialNumber
:
100
tuner
:
className
:
tuner.FixedProductTuner
codeDirectory
:
.
classArgs
:
product
:
2
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
useActiveGpu
:
false
# NOTE: Use "true" if you are using an OS with graphical interface (e.g. Windows 10, Ubuntu desktop)
# Check the doc for details: https://nni.readthedocs.io/en/latest/reference/experiment_config.html#useactivegputrial:
examples/trials/efficientnet/config_local.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
unknown
experimentName
:
example_efficient_net
trialConcurrency
:
4
maxExecDuration
:
99999d
maxTrialNum
:
100
trainingServicePlatform
:
local
searchSpacePath
:
search_net.json
useAnnotation
:
false
tuner
:
codeDir
:
.
classFileName
:
tuner.py
className
:
FixedProductTuner
classArgs
:
product
:
2
trial
:
codeDir
:
EfficientNet-PyTorch
command
:
python main.py /data/imagenet -j 12 -a efficientnet --batch-size 48 --lr 0.048 --wd 1e-5 --epochs 5 --request-from-nni
gpuNum
:
1
examples/trials/efficientnet/config_pai.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
unknown
experimentName
:
example_efficient_net
trialConcurrency
:
8
maxExecDuration
:
48h
maxTrialNum
:
100
trainingServicePlatform
:
pai
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
nniManagerNFSMountPath
:
{
replace_to_your_nfs_mount_path
}
containerNFSMountPath
:
{
replace_to_your_container_mount_path
}
paiStorageConfigName
:
{
replace_to_your_storage_config_name
}
nniManagerIp
:
<nni_manager_ip>
paiConfig
:
userName
:
<username>
token
:
<token>
host
:
<host>
examples/trials/efficientnet/tuner.py
View file @
eb65bc32
from
nni.
gridsearch_tuner
.gridsearch_tuner
import
GridSearchTuner
from
nni.
algorithms.hpo
.gridsearch_tuner
import
GridSearchTuner
class
FixedProductTuner
(
GridSearchTuner
):
...
...
examples/trials/ga_squad/config.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_ga_squad
trialCommand
:
python3 trial.py
trialGpuNumber
:
0
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
#choice: true, false
useAnnotation
:
false
maxTrialNumber
:
10
maxExperimentDuration
:
1h
searchSpace
:
{}
# hard-coded in tuner
tuner
:
codeDir
:
../../tuners/ga_customer_tuner
classFileName
:
customer_tuner.py
className
:
CustomerTuner
className
:
customer_tuner.CustomerTuner
codeDirectory
:
../../tuners/ga_customer_tuner
classArgs
:
optimize_mode
:
maximize
trial
:
command
:
python3 trial.py
codeDir
:
.
gpuNum
:
0
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
examples/trials/ga_squad/config_pai.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
default
experimentName
:
example_ga_squad
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
pai
#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
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStorageConfigName
:
confignfs-data
paiConfig
:
#The username to login pai
userName
:
username
#The token to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/kaggle-tgs-salt/config.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_tgs
trialConcurrency
:
2
maxExecDuration
:
10h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
#choice: true, false
useAnnotation
:
true
trialCommand
:
python3 train.py
trialGpuNumber
:
0
trialConcurrency
:
2
maxTrialNumber
:
10
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
name
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 train.py
codeDir
:
.
gpuNum
:
1
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
examples/trials/mnist-advisor/config_bohb.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_mnist_bohb
# Run following command first to install dependencies of BOHB tuner:
# $ python3 -m pip install nni[BOHB]
searchSpaceFile
:
search_space.json
trialCommand
:
python3 mnist.py
trialGpuNumber
:
0
trialConcurrency
:
1
maxExecDuration
:
10h
maxTrialNum
:
1000
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
maxExperimentDuration
:
10h
maxTrialNumber
:
1000
advisor
:
#choice: Hyperband, BOHB
#(BOHB should be installed through nnictl)
builtinAdvisorName
:
BOHB
name
:
BOHB
classArgs
:
max_budget
:
27
min_budget
:
1
eta
:
3
optimize_mode
:
maximize
trial
:
command
:
python3 mnist.py
codeDir
:
.
gpuNum
:
0
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
examples/trials/mnist-advisor/config_hyperband.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_mnist_hyperband
searchSpaceFile
:
search_space.json
trialCommand
:
python3 mnist.py
trialGpuNumber
:
0
trialConcurrency
:
2
maxExecDuration
:
100h
maxTrialNum
:
10000
#choice: local, remote, pai
trainingServicePlatform
:
local
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
maxExperimentDuration
:
100h
maxTrialNumber
:
10000
advisor
:
#choice: Hyperband, BOHB
builtinAdvisorName
:
Hyperband
name
:
Hyperband
classArgs
:
#
R: the maximum trial budget (could be the number of mini-batches or epochs) can be
R
:
100
#
the maximum trial budget (could be the number of mini-batches or epochs) can be
# allocated to a trial. Each trial should use trial budget to control how long it runs.
R
:
100
#eta: proportion of discarded trials
eta
:
3
#choice: maximize, minimize
optimize_mode
:
maximize
#choice: serial, parallelism
exec_mode
:
parallelism
trial
:
command
:
python3 mnist.py
codeDir
:
.
gpuNum
:
0
eta
:
3
# proportion of discarded trials
optimize_mode
:
maximize
# maximize or minimize
exec_mode
:
parallelism
# serial or parallelism
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
examples/trials/mnist-advisor/config_pai.yml
deleted
100644 → 0
View file @
c4d449c5
authorName
:
default
experimentName
:
example_mnist_hyperband
maxExecDuration
:
1h
maxTrialNum
:
10000
trialConcurrency
:
10
#choice: local, remote, pai
trainingServicePlatform
:
pai
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
#choice: serial, parallelism
exec_mode
:
parallelism
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
nniManagerNFSMountPath
:
/home/user/mnt
containerNFSMountPath
:
/mnt/data/user
paiStorageConfigName
:
confignfs-data
paiConfig
:
#The username to login pai
userName
:
username
#The token to login pai
token
:
token
#The host of restful server of pai
host
:
10.10.10.10
examples/trials/mnist-annotation/config.yml
View file @
eb65bc32
authorName
:
default
experimentName
:
example_mnist
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai
trainingServicePlatform
:
local
#choice: true, false
useAnnotation
:
true
trialCommand
:
python3 mnist.py
trialGpuNumber
:
0
trialConcurrency
:
1
maxTrialNumber
:
10
maxExperimentDuration
:
1h
tuner
:
#choice: TPE, Random, Anneal, Evolution, BatchTuner, MetisTuner
#SMAC (SMAC should be installed through nnictl)
builtinTunerName
:
TPE
name
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
trial
:
command
:
python3 mnist.py
codeDir
:
.
gpuNum
:
0
trainingService
:
# For other platforms, check mnist-pytorch example
platform
:
local
Prev
1
2
3
4
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