This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Port trial examples' config file to v2 #3721
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
73044ae
port examples to v2 and fix bugs
357fa15
add removed example back
cb449e4
bugfix
d5ca817
remove debug code
42dc350
python -> python3
1df4f66
add hybrid example
e43f044
fix typo and add name field to detailed example
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
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 | ||
trainingService: # For other platforms, check mnist-pytorch example | ||
platform: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
{ | ||
"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] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
29 changes: 11 additions & 18 deletions
29
examples/trials/benchmarking/hyperband/config_hyperband.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
{ | ||
"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"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest at least for this simple example, we add "experimentName", because if users really use nni to run experiments, they want to give each experiment an easy-to-remember name (not experiment ID). If this field is not added in the example, users have to check config references, which is not friendly