Commit b210695f authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Merge branch 'master' into dev-pruner-dataparallel

parents c7d58033 fdfff50d
# 安装 NNI
当前支持在 Linux,Mac 和 Windows 下安装。
当前支持在 Linux,macOS 和 Windows 下安装。
## **在 Linux 和 Mac 下安装**
## 在 Linux 或 macOS 上安装
* **通过 pip 命令安装 NNI**
* 通过 pip 命令安装 NNI
先决条件:`python >= 3.5`
先决条件:`python 64-bit >= 3.5`
```bash
python3 -m pip install --upgrade nni
```
* **通过源代码安装 NNI**
* 通过源代码安装 NNI
先决条件:`python >=3.5`, `git`, `wget`
如果对某个或最新版本的代码感兴趣,可通过源代码安装 NNI。
先决条件:`python 64-bit >=3.5`, `git`, `wget`
```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git
......@@ -22,25 +24,27 @@
./install.sh
```
* **docker 映像中安装 NNI**
*Docker 映像中使用 NNI
也可将 NNI 安装到 docker 映像中。 参考[这里](../deployment/docker/README.md)来生成 NNI 的 Docker 映像。 也可通过此命令从 Docker Hub 中直接拉取 NNI 的映像 `docker pull msranni/nni:latest`
## **在 Windows 上安装**
## 在 Windows 上安装
推荐使用 Anaconda 或 Miniconda。
强烈建议使用 Anaconda 或 Miniconda 来管理多个 Python 环境
* **通过 pip 命令安装 NNI**
* 通过 pip 命令安装 NNI
先决条件:`python(64-bit) >= 3.5`
先决条件:`python 64-bit >= 3.5`
```bash
python -m pip install --upgrade nni
```
* **通过源代码安装 NNI**
* 通过源代码安装 NNI
如果对某个或最新版本的代码感兴趣,可通过源代码安装 NNI。
先决条件:`python >=3.5`, `git`, `PowerShell`
先决条件:`python 64-bit >=3.5`, `git`, `PowerShell`
```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git
......@@ -48,40 +52,101 @@
powershell -ExecutionPolicy Bypass -file install.ps1
```
## **系统需求**
## 验证安装
以下示例基于 TensorFlow 1.x 。确保运行环境中使用的的是 ** TensorFlow 1.x**
* 通过克隆源代码下载示例。
```bash
git clone -b v1.3 https://github.com/Microsoft/nni.git
```
* 运行 MNIST 示例。
以下是 NNI 在 Linux 下的最低配置。 由于程序变更,NNI 的最低配置会有所更改。
Linux 或 macOS
```bash
nnictl create --config nni/examples/trials/mnist-tfv1/config.yml
```
Windows
```bash
nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml
```
| | 最低配置 | 推荐配置 |
| -------- | ------------------------------------- | ----------------------------------------- |
| **操作系统** | Ubuntu 16.04 或以上版本 | Ubuntu 16.04 或以上版本 |
| **CPU** | Intel® Core™ i3 或 AMD Phenom™ X3 8650 | Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置 |
| **GPU** | NVIDIA® GeForce® GTX 460 | NVIDIA® GeForce® GTX 660 或更高配置 |
| **内存** | 4 GB | 6 GB |
* 在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。
```text
INFO: Starting restful server...
INFO: Successfully started Restful server!
INFO: Setting local config...
INFO: Successfully set local config!
INFO: Starting experiment...
INFO: Successfully started experiment!
-----------------------------------------------------------------------
The experiment id is egchD4qy
The Web UI urls are: http://223.255.255.1:8080 http://127.0.0.1:8080
-----------------------------------------------------------------------
You can use these commands to get more information about the experiment
-----------------------------------------------------------------------
commands description
1. nnictl experiment show show the information of experiments
2. nnictl trial ls list all of trial jobs
3. nnictl top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```
* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](../Tutorial/WebUI.md)的更多页面。
![概述](../../img/webui_overview_page.png)
![详细说明](../../img/webui_trialdetail_page.png)
## 系统需求
由于程序变更,NNI 的最低配置会有所更改。
### Linux
| | 推荐配置 | 最低配置 |
| -------- | ----------------------------------------- | ------------------------------------- |
| **操作系统** | Ubuntu 16.04 或以上版本 | |
| **CPU** | Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置 | Intel® Core™ i3 或 AMD Phenom™ X3 8650 |
| **GPU** | NVIDIA® GeForce® GTX 660 或更高配置 | NVIDIA® GeForce® GTX 460 |
| **内存** | 6 GB | 4 GB |
| **存储** | 30 GB 可用的磁盘空间 | |
| **网络** | 宽带连接 | |
| **分辨率** | 1024 x 768 以上 | |
以下是 NNI 在 MacOS 下的最低配置。 由于程序变更,NNI 的最低配置会有所更改。
### macOS
| | 最低配置 | 推荐配置 |
| -------- | -------------------------------------------------- | ------------------------ |
| **操作系统** | macOS 10.14.1 (最新版本) | macOS 10.14.1 (最新版本) |
| **CPU** | Intel® Core™ i5-760 或更高 | Intel® Core™ i7-4770 或更高 |
| **GPU** | NVIDIA® GeForce® GT 750M 或 AMD Radeon™ R9 M290 或更高 | AMD Radeon™ R9 M395X 或更高 |
| **内存** | 4 GB | 8 GB |
| **存储** | 70GB 可用空间及 7200 RPM 硬盘 | 70GB 可用空间 SSD 硬盘 |
| | 推荐配置 | 最低配置 |
| -------- | ------------------------ | -------------------------------------------------- |
| **操作系统** | macOS 10.14.1 或更高版本 | |
| **CPU** | Intel® Core™ i7-4770 或更高 | Intel® Core™ i5-760 或更高 |
| **GPU** | AMD Radeon™ R9 M395X 或更高 | NVIDIA® GeForce® GT 750M 或 AMD Radeon™ R9 M290 或更高 |
| **内存** | 8 GB | 4 GB |
| **存储** | 70GB 可用空间 SSD 硬盘 | 70GB 可用空间及 7200 RPM 硬盘 |
| **网络** | 宽带连接 | |
| **分辨率** | 1024 x 768 以上 | |
以下是 NNI 在 Windows 上的最低配置,推荐使用 Windows 10 1809 版。 由于程序变更,NNI 的最低配置会有所更改。
### Windows
| | 最低配置 | 推荐配置 |
| -------- | ------------------------------------- | ----------------------------------------- |
| **操作系统** | Windows 10 | Windows 10 |
| **CPU** | Intel® Core™ i3 或 AMD Phenom™ X3 8650 | Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置 |
| **GPU** | NVIDIA® GeForce® GTX 460 | NVIDIA® GeForce® GTX 660 或更高配置 |
| **内存** | 4 GB | 6 GB |
| | 推荐配置 | 最低配置 |
| -------- | ----------------------------------------- | ------------------------------------- |
| **操作系统** | Windows 10 1809 或更高版本 | |
| **CPU** | Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置 | Intel® Core™ i3 或 AMD Phenom™ X3 8650 |
| **GPU** | NVIDIA® GeForce® GTX 660 或更高配置 | NVIDIA® GeForce® GTX 460 |
| **内存** | 6 GB | 4 GB |
| **存储** | 30 GB 可用的磁盘空间 | |
| **网络** | 宽带连接 | |
| **分辨率** | 1024 x 768 以上 | |
......
......@@ -49,6 +49,7 @@ nnictl 支持的命令:
| --config, -c | True | | Experiment 的 YAML 配置文件 |
| --port, -p | False | | RESTful 服务的端口 |
| --debug, -d | False | | 设置为调试模式 |
| --watch, -w | False | | 启动为监视模式 |
* 示例
......@@ -97,6 +98,7 @@ nnictl 支持的命令:
| id | True | | 要恢复的 Experiment 标识 |
| --port, -p | False | | 要恢复的 Experiment 使用的 RESTful 服务端口 |
| --debug, -d | False | | 设置为调试模式 |
| --watch, -w | False | | 启动为监视模式 |
* 示例
......
......@@ -2,15 +2,15 @@
## 安装
当前支持 Linux,MacOS 和 Windows,在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
当前支持 Linux,macOS 和 Windows,在 Ubuntu 16.04 或更高版本,macOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
#### Linux 和 MacOS
**Linux 和 macOS**
```bash
python3 -m pip install --upgrade nni
```
#### Windows
**Windows**
```bash
python -m pip install --upgrade nni
......@@ -18,7 +18,7 @@
注意:
* 在 Linux 和 MacOS 上,如果要将 NNI 安装到当前用户的 home 目录中,可使用 `--user`,则不需要特殊权限。
* 在 Linux 和 macOS 上,如果要将 NNI 安装到当前用户的 home 目录中,可使用 `--user`,则不需要特殊权限。
* 如果遇到如`Segmentation fault` 这样的任何错误请参考[常见问题](FAQ.md)
* 参考[安装 NNI](Installation.md),来了解`系统需求`
......@@ -54,21 +54,22 @@ if __name__ == '__main__':
NNI 用来帮助超参调优。它的流程如下:
输入: 搜索空间, Trial 代码, 配置文件
输出: 一组最佳的超参配置
1: For t = 0, 1, 2, ..., maxTrialNum,
2: hyperparameter = 从搜索空间选择一组参数
3: final result = run_trial_and_evaluate(hyperparameter)
4: 返回最终结果给 NNI
5: If 时间达到上限,
6: 停止实验
7: return 最好的实验结果
```text
输入: 搜索空间, Trial 代码, 配置文件
输出: 一组最佳的超参配置
1: For t = 0, 1, 2, ..., maxTrialNum,
2: hyperparameter = 从搜索空间选择一组参数
3: final result = run_trial_and_evaluate(hyperparameter)
4: 返回最终结果给 NNI
5: If 时间达到上限,
6: 停止实验
7: return 最好的实验结果
```
如果需要使用 NNI 来自动训练模型,找到最佳超参,需要如下三步:
**使用 NNI 时的三个步骤**
**启动 Experiment 的三个步骤**
**第一步**:定义 JSON 格式的`搜索空间`文件,包括所有需要搜索的超参的`名称``分布`(离散和连续值均可)。
......@@ -140,7 +141,7 @@ trial:
上面的代码都已准备好,并保存在 [examples/trials/mnist-tfv1/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1)
#### Linux 和 macOS
**Linux 和 macOS**
从命令行使用 **config.yml** 文件启动 MNIST Experiment 。
......@@ -148,17 +149,17 @@ trial:
nnictl create --config nni/examples/trials/mnist-tfv1/config.yml
```
#### Windows
**Windows**
从命令行使用 **config_windows.yml** 文件启动 MNIST Experiment 。
**注意**:如果使用 Windows,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。
注意:如果使用 Windows,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。
```bash
nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml
```
注意:**nnictl** 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](Nnictl.md),了解 `nnictl` 更多用法。
注意:`nnictl` 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](Nnictl.md),了解 `nnictl` 更多用法。
在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 期望的输出如下:
......@@ -201,7 +202,7 @@ Web 地址为:[IP 地址]:8080
在浏览器中打开 `Web 界面地址`(即:`[IP 地址]:8080`),就可以看到 Experiment 的详细信息,以及所有的 Trial 任务。 如果无法打开终端中的 Web 界面链接,可以参考 [FAQ](FAQ.md)
#### 查看概要页面
### 查看概要页面
点击标签 "Overview"。
......@@ -213,7 +214,7 @@ Experiment 相关信息会显示在界面上,配置和搜索空间等。 可
![](../../img/QuickStart2.png)
#### 查看 Trial 详情页面
### 查看 Trial 详情页面
点击 "Default Metric" 来查看所有 Trial 的点图。 悬停鼠标来查看默认指标和搜索空间信息。
......
......@@ -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
......
......@@ -11,3 +11,5 @@
EvolutionSQuAD<./TrialExample/SquadEvolutionExamples>
GBDT<./TrialExample/GbdtExample>
RocksDB <./TrialExample/RocksdbExamples>
KD 示例 <./TrialExample/KDExample>
EfficientNet <./TrialExample/EfficientNet>
......@@ -18,7 +18,7 @@ NNI 中也内置了一些流程的模型压缩算法。
概述 <Compressor/Overview>
Level Pruner <Compressor/Pruner>
AGP Pruner <Compressor/Pruner>
L1Filter Pruner <Compressor/L1FilterPruner>
L1Filter Pruner <Compressor/l1filterpruner>
Slim Pruner <Compressor/SlimPruner>
Lottery Ticket Pruner <Compressor/LotteryTicketHypothesis>
FPGM Pruner <Compressor/Pruner>
......
......@@ -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>
......@@ -6,5 +6,6 @@ NNI 支持的训练平台介绍
本机<./TrainingService/LocalMode>
远程<./TrainingService/RemoteMachineMode>
OpenPAI<./TrainingService/PaiMode>
OpenPAI Yarn 模式<./TrainingService/PaiYarnMode>
Kubeflow<./TrainingService/KubeflowMode>
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:
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
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:
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
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
[EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946)
Provided here are: Search space and tuners for finding the best tuple (alpha, beta, gamma) for EfficientNet-B1 with grid search, as discussed in Section 3.3 in [paper](https://arxiv.org/abs/1905.11946).
## Instructions
1. Set your working directory here in this directory.
2. Run `git clone https://github.com/ultmaster/EfficientNet-PyTorch` to clone this modified version of [EfficientNet-PyTorch](https://github.com/lukemelas/EfficientNet-PyTorch). The modifications were done to adhere to the original [Tensorflow version](https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet) as close as possible (including EMA, label smoothing and etc.); also added are the part which gets parameters from tuner and reports intermediate/final results. Clone it into `EfficientNet-PyTorch`; the files like `main.py`, `train_imagenet.sh` will appear inside, as specified in the configuration files.
3. Run `nnictl create --config config_net.yml` to find the best EfficientNet-B1. Adjust the training service (PAI/local/remote), batch size in the config files according to the environment.
For training on ImageNet, read `EfficientNet-PyTorch/train_imagenet.sh`. Download ImageNet beforehand and extract it adhering to [PyTorch format](https://pytorch.org/docs/stable/torchvision/datasets.html#imagenet) and then replace `/mnt/data/imagenet` in with the location of the ImageNet storage. This file should also be a good example to follow for mounting ImageNet into the container on OpenPAI.
## Results
The follow image is a screenshot, demonstrating the relationship between acc@1 and alpha, beta, gamma.
![](assets/search_result.png)
\ No newline at end of file
[Documentation](https://nni.readthedocs.io/en/latest/TrialExample/EfficientNet.html)
# 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 之间的关系。
![](assets/search_result.png)
\ No newline at end of file
[文档](https://nni.readthedocs.io/en/latest/TrialExample/EfficientNet.html)
\ No newline at end of file
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
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: /home/user/mnt
containerNFSMountPath: /mnt/data/user
paiStoragePlugin: team_wise
nniManagerIp: <nni_manager_ip>
paiConfig:
userName: <username>
token: <token>
host: <host>
......@@ -3,7 +3,7 @@ experimentName: example_efficient_net
trialConcurrency: 8
maxExecDuration: 48h
maxTrialNum: 100
trainingServicePlatform: pai
trainingServicePlatform: paiYarn
searchSpacePath: search_net.json
useAnnotation: false
tuner:
......@@ -22,7 +22,7 @@ trial:
virtualCluster: nni
image: msranni/nni:latest
nniManagerIp: <nni_manager_ip>
paiConfig:
paiYarnConfig:
userName: <username>
passWord: <password>
host: <host>
{
"alpha": {
"_type": "quniform",
"_value": [1.0, 2.0, 0.1]
"_value": [1.0, 2.0, 0.05]
},
"beta": {
"_type": "quniform",
"_value": [1.0, 1.5, 0.1]
"_value": [1.0, 1.5, 0.05]
},
"gamma": {
"_type": "quniform",
"_value": [1.0, 1.5, 0.1]
"_value": [1.0, 1.5, 0.05]
}
}
......@@ -14,11 +14,11 @@ class FixedProductTuner(GridSearchTuner):
super().__init__()
self.product = product
def expand_parameters(self, para):
def _expand_parameters(self, para):
"""
Filter out all qualified parameters
"""
para = super().expand_parameters(para)
para = super()._expand_parameters(para)
if all([key in para[0] for key in ["alpha", "beta", "gamma"]]): # if this is an interested set
ret_para = []
for p in para:
......
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