"git@developer.sourcefind.cn:norm/vllm.git" did not exist on "dc903e70acf9dba74d6afaa50e7b5650d6b9338a"
Unverified Commit e9f137f0 authored by QuanluZhang's avatar QuanluZhang Committed by GitHub
Browse files

merge from master (#2019)

parent f7cf3ea5
...@@ -47,6 +47,9 @@ extensions = [ ...@@ -47,6 +47,9 @@ extensions = [
'sphinx.ext.napoleon', 'sphinx.ext.napoleon',
] ]
# 添加示例模块
autodoc_mock_imports = ['apex']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
...@@ -72,7 +75,7 @@ language = None ...@@ -72,7 +75,7 @@ language = None
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path. # 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. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = None pygments_style = None
......
...@@ -11,3 +11,5 @@ ...@@ -11,3 +11,5 @@
EvolutionSQuAD<./TrialExample/SquadEvolutionExamples> EvolutionSQuAD<./TrialExample/SquadEvolutionExamples>
GBDT<./TrialExample/GbdtExample> GBDT<./TrialExample/GbdtExample>
RocksDB <./TrialExample/RocksdbExamples> RocksDB <./TrialExample/RocksdbExamples>
KD 示例 <./TrialExample/KDExample>
EfficientNet <./TrialExample/EfficientNet>
...@@ -18,7 +18,7 @@ NNI 中也内置了一些流程的模型压缩算法。 ...@@ -18,7 +18,7 @@ NNI 中也内置了一些流程的模型压缩算法。
概述 <Compressor/Overview> 概述 <Compressor/Overview>
Level Pruner <Compressor/Pruner> Level Pruner <Compressor/Pruner>
AGP Pruner <Compressor/Pruner> AGP Pruner <Compressor/Pruner>
L1Filter Pruner <Compressor/L1FilterPruner> L1Filter Pruner <Compressor/l1filterpruner>
Slim Pruner <Compressor/SlimPruner> Slim Pruner <Compressor/SlimPruner>
Lottery Ticket Pruner <Compressor/LotteryTicketHypothesis> Lottery Ticket Pruner <Compressor/LotteryTicketHypothesis>
FPGM Pruner <Compressor/Pruner> FPGM Pruner <Compressor/Pruner>
......
...@@ -22,4 +22,6 @@ NAS 算法 ...@@ -22,4 +22,6 @@ NAS 算法
NAS 接口 <NAS/NasInterface> NAS 接口 <NAS/NasInterface>
ENAS <NAS/ENAS> ENAS <NAS/ENAS>
DARTS <NAS/DARTS> DARTS <NAS/DARTS>
P-DARTS <NAS/Overview> P-DARTS <NAS/PDARTS>
SPOS <NAS/SPOS>
CDARTS <NAS/CDARTS>
...@@ -6,5 +6,6 @@ NNI 支持的训练平台介绍 ...@@ -6,5 +6,6 @@ NNI 支持的训练平台介绍
本机<./TrainingService/LocalMode> 本机<./TrainingService/LocalMode>
远程<./TrainingService/RemoteMachineMode> 远程<./TrainingService/RemoteMachineMode>
OpenPAI<./TrainingService/PaiMode> OpenPAI<./TrainingService/PaiMode>
OpenPAI Yarn 模式<./TrainingService/PaiYarnMode>
Kubeflow<./TrainingService/KubeflowMode> Kubeflow<./TrainingService/KubeflowMode>
FrameworkController<./TrainingService/FrameworkControllerMode> FrameworkController<./TrainingService/FrameworkControllerMode>
**NNI 中的自动特征工程** **NNI 中的自动特征工程** ===
===
[示例](https://github.com/SpongebBob/tabular_automl_NNI)在 NNI 中实现了自动特征工程。 [示例](https://github.com/SpongebBob/tabular_automl_NNI)在 NNI 中实现了自动特征工程。
代码来自于贡献者。 谢谢可爱的贡献者! 代码来自于贡献者。 谢谢可爱的贡献者!
欢迎越来越多的人加入我们! 欢迎越来越多的人加入我们!
\ No newline at end of file
...@@ -23,10 +23,13 @@ trial: ...@@ -23,10 +23,13 @@ trial:
memoryMB: 8196 memoryMB: 8196
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
\ No newline at end of file
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
...@@ -23,10 +23,13 @@ trial: ...@@ -23,10 +23,13 @@ trial:
memoryMB: 8196 memoryMB: 8196
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
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
# EfficientNet [文档](https://nni.readthedocs.io/en/latest/TrialExample/EfficientNet.html)
\ No newline at end of file
[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 之间的关系。
![](assets/search_result.png)
\ No newline at end of file
...@@ -21,8 +21,11 @@ trial: ...@@ -21,8 +21,11 @@ trial:
gpuNum: 1 gpuNum: 1
virtualCluster: nni virtualCluster: nni
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
nniManagerIp: <nni_manager_ip> nniManagerIp: <nni_manager_ip>
paiConfig: paiConfig:
userName: <username> userName: <username>
passWord: <password> token: <token>
host: <host> host: <host>
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>
...@@ -23,10 +23,13 @@ trial: ...@@ -23,10 +23,13 @@ trial:
memoryMB: 32869 memoryMB: 32869
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
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
...@@ -27,10 +27,13 @@ trial: ...@@ -27,10 +27,13 @@ trial:
memoryMB: 8196 memoryMB: 8196
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
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
...@@ -22,10 +22,13 @@ trial: ...@@ -22,10 +22,13 @@ trial:
memoryMB: 8196 memoryMB: 8196
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
\ No newline at end of file
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
...@@ -20,10 +20,13 @@ trial: ...@@ -20,10 +20,13 @@ trial:
memoryMB: 8196 memoryMB: 8196
#The docker image to run nni job on pai #The docker image to run nni job on pai
image: msranni/nni:latest image: msranni/nni:latest
nniManagerNFSMountPath: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
paiConfig: paiConfig:
#The username to login pai #The username to login pai
userName: username userName: username
#The password to login pai #The token to login pai
passWord: password token: token
#The host of restful server of pai #The host of restful server of pai
host: 10.10.10.10 host: 10.10.10.10
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment