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
aa316742
Unverified
Commit
aa316742
authored
Feb 21, 2020
by
SparkSnail
Committed by
GitHub
Feb 21, 2020
Browse files
Merge pull request #233 from microsoft/master
merge master
parents
3fe117f0
24fa4619
Changes
285
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
364 additions
and
18 deletions
+364
-18
examples/trials/cifar10_pytorch/config_paiYarn.yml
examples/trials/cifar10_pytorch/config_paiYarn.yml
+32
-0
examples/trials/cifar10_pytorch/main.py
examples/trials/cifar10_pytorch/main.py
+9
-2
examples/trials/efficientnet/README_zh_CN.md
examples/trials/efficientnet/README_zh_CN.md
+1
-1
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
examples/trials/mnist-batch-tune-keras/config_paiYarn.yml
examples/trials/mnist-batch-tune-keras/config_paiYarn.yml
+29
-0
examples/trials/mnist-keras/config_pai.yml
examples/trials/mnist-keras/config_pai.yml
+5
-2
examples/trials/mnist-keras/config_paiYarn.yml
examples/trials/mnist-keras/config_paiYarn.yml
+32
-0
examples/trials/mnist-pytorch/config_pai.yml
examples/trials/mnist-pytorch/config_pai.yml
+5
-2
examples/trials/mnist-pytorch/config_paiYarn.yml
examples/trials/mnist-pytorch/config_paiYarn.yml
+32
-0
examples/trials/mnist-tfv1/config_pai.yml
examples/trials/mnist-tfv1/config_pai.yml
+5
-2
examples/trials/mnist-tfv1/config_paiYarn.yml
examples/trials/mnist-tfv1/config_paiYarn.yml
+32
-0
examples/trials/nas_cifar10/config_paiYarn_ppo.yml
examples/trials/nas_cifar10/config_paiYarn_ppo.yml
+31
-0
No files found.
examples/trials/cifar10_pytorch/config_paiYarn.yml
0 → 100644
View file @
aa316742
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/cifar10_pytorch/main.py
View file @
aa316742
...
...
@@ -99,7 +99,7 @@ def prepare(args):
# Training
def
train
(
epoch
):
def
train
(
epoch
,
batches
=-
1
):
global
trainloader
global
testloader
global
net
...
...
@@ -129,6 +129,9 @@ def train(epoch):
progress_bar
(
batch_idx
,
len
(
trainloader
),
'Loss: %.3f | Acc: %.3f%% (%d/%d)'
%
(
train_loss
/
(
batch_idx
+
1
),
100.
*
correct
/
total
,
correct
,
total
))
if
batches
>
0
and
(
batch_idx
+
1
)
>=
batches
:
return
def
test
(
epoch
):
global
best_acc
global
trainloader
...
...
@@ -176,6 +179,10 @@ def test(epoch):
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--epochs"
,
type
=
int
,
default
=
200
)
# Maximum mini-batches per epoch, for code testing purpose
parser
.
add_argument
(
"--batches"
,
type
=
int
,
default
=-
1
)
args
,
_
=
parser
.
parse_known_args
()
try
:
...
...
@@ -187,7 +194,7 @@ if __name__ == '__main__':
acc
=
0.0
best_acc
=
0.0
for
epoch
in
range
(
start_epoch
,
start_epoch
+
args
.
epochs
):
train
(
epoch
)
train
(
epoch
,
args
.
batches
)
acc
,
best_acc
=
test
(
epoch
)
nni
.
report_intermediate_result
(
acc
)
...
...
examples/trials/efficientnet/README_zh_CN.md
View file @
aa316742
[
文档
](
https://nni.readthedocs.io/en/latest/TrialExample/EfficientNet.html
)
\ No newline at end of file
[
文档
](
https://nni.readthedocs.io/zh/latest/TrialExample/EfficientNet.html
)
\ No newline at end of file
examples/trials/efficientnet/config_pai.yml
View file @
aa316742
...
...
@@ -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 @
aa316742
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 @
aa316742
...
...
@@ -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 @
aa316742
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 @
aa316742
...
...
@@ -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 @
aa316742
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 @
aa316742
...
...
@@ -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 @
aa316742
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 @
aa316742
...
...
@@ -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
examples/trials/mnist-batch-tune-keras/config_paiYarn.yml
0 → 100644
View file @
aa316742
authorName
:
default
experimentName
:
example_mnist-keras
trialConcurrency
:
1
maxExecDuration
:
1h
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
:
BatchTuner
trial
:
command
:
python3 mnist-keras.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-keras/config_pai.yml
View file @
aa316742
...
...
@@ -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/mnist-keras/config_paiYarn.yml
0 → 100644
View file @
aa316742
authorName
:
default
experimentName
:
example_mnist-keras
trialConcurrency
:
1
maxExecDuration
:
1h
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 mnist-keras.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-pytorch/config_pai.yml
View file @
aa316742
...
...
@@ -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/mnist-pytorch/config_paiYarn.yml
0 → 100644
View file @
aa316742
authorName
:
default
experimentName
:
example_mnist_pytorch
trialConcurrency
:
1
maxExecDuration
:
1h
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
:
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-tfv1/config_pai.yml
View file @
aa316742
...
...
@@ -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/mnist-tfv1/config_paiYarn.yml
0 → 100644
View file @
aa316742
authorName
:
default
experimentName
:
example_mnist
trialConcurrency
:
1
maxExecDuration
:
1h
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
:
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/nas_cifar10/config_paiYarn_ppo.yml
0 → 100644
View file @
aa316742
authorName
:
Unknown
experimentName
:
enas_macro
trialConcurrency
:
20
maxExecDuration
:
2400h
maxTrialNum
:
20000
#choice: local, remote
trainingServicePlatform
:
paiYarn
#choice: true, false
useAnnotation
:
true
multiPhase
:
false
versionCheck
:
false
nniManagerIp
:
0.0.0.0
tuner
:
builtinTunerName
:
PPOTuner
classArgs
:
optimize_mode
:
maximize
trials_per_update
:
60
epochs_per_update
:
20
minibatch_size
:
6
trial
:
command
:
sh ./macro_cifar10_pai.sh
codeDir
:
./
gpuNum
:
1
cpuNum
:
1
memoryMB
:
8196
image
:
msranni/nni:latest
virtualCluster
:
nni
paiYarnConfig
:
userName
:
your_account
passWord
:
your_passwd
host
:
0.0.0.0
Prev
1
2
3
4
5
6
7
8
9
10
…
15
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