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

Merge pull request #20 from microsoft/master

pull code
parents 611a45fc 61fec446
......@@ -164,7 +164,7 @@ trial:
**注意**:如果使用 Windows,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
nnictl create --config nni\examples\trials\mnist\config_windows.yml
```
注意:**nnictl** 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](Nnictl.md),了解 `nnictl` 更多用法。
......
# 更改日志
# 发布 0.8 - 6/4/2019
## 主要功能
* 在 Windows 上支持 NNI 的 OpenPAI 和远程模式
* NNI 可在 Windows 上使用 OpenPAI 模式
* NNI 可在 Windows 上使用 OpenPAI 模式
* GPU 的高级功能
* 在本机或远程模式上,可在同一个 GPU 上运行多个 Trial。
* 在已经运行非 NNI 任务的 GPU 上也能运行 Trial
* 支持 Kubeflow v1beta2 操作符
* 支持 Kubeflow TFJob/PyTorchJob v1beta2
* [通过 NAS 编程接口](./GeneralNasInterfaces.md)
* 实现了 NAS 的编程接口,可通过 NNI Annotation 很容易的表达神经网络架构搜索空间
* 提供新命令 `nnictl trial codegen` 来调试 NAS 代码生成部分
* 提供 NAS 编程接口教程,NAS 在 MNIST 上的示例,用于 NAS 的可定制的随机 Tuner
* 支持在恢复 Experiment 时,同时恢复 Tuner 和 Advisor 的状态
* 在恢复 Experiment 时,Tuner 和 Advisor 会导入已完成的 Trial 的数据。
* Web 界面
* 改进拷贝 Trial 参数的设计
* 在 hyper-parameter 图中支持 'randint' 类型
* 使用 ComponentUpdate 来避免不必要的刷新
## Bug 修复和其它更新
* 修复 `nnictl update` 不一致的命令行风格
* SMAC Tuner 支持导入数据
* 支持 Experiment 状态从 ERROR 回到 RUNNING
* 修复表格的 Bug
* 优化嵌套搜索空间
* 优化 'randint' 类型,并支持下限
* [比较不同超参搜索调优算法](./CommunitySharings/HpoComparision.md)
* [NAS 算法的对比](./CommunitySharings/NasComparision.md)
* [Recommenders 上的实践](./CommunitySharings/NniPracticeSharing/RecommendersSvd.md)
## 发布 0.7 - 4/29/2018
### 主要功能
......@@ -31,10 +66,10 @@
### 主要功能
* [版本检查](https://github.com/Microsoft/nni/blob/master/docs/zh_CN/PaiMode.md#version-check)
* [版本检查](https://github.com/Microsoft/nni/blob/master/docs/en_US/PaiMode.md#version-check)
* 检查 nniManager 和 trialKeeper 的版本是否一致
* [提前终止的任务也可返回最终指标](https://github.com/Microsoft/nni/issues/776)
* 如果 includeIntermediateResults 为 true,最后一个 Assessor 的中间结果会被发送给 Tuner 作为最终结果。 includeIntermediateResults 的默认值为 false。
* 如果 includeIntermediateResults 为 true,最后一个 Assessor 的中间结果会被发送给 Tuner 作为最终结果。 includeIntermediateResults 的默认值为 false。
* [分离 Tuner/Assessor](https://github.com/Microsoft/nni/issues/841)
* 增加两个管道来分离 Tuner 和 Assessor 的消息
* 使日志集合功能可配置
......
......@@ -29,16 +29,16 @@
* 表示变量的值是选项之一。 这里的 'options' 是一个数组。 选项的每个元素都是字符串。 也可以是嵌套的子搜索空间。此子搜索空间仅在相应的元素选中后才起作用。 该子搜索空间中的变量可看作是条件变量。
* 这是个简单的 [nested] 搜索空间定义的[示例](https://github.com/microsoft/nni/tree/master/examples/trials/mnist-nested-search-space/search_space.json)。 如果选项列表中的元素是 dict,则它是一个子搜索空间,对于内置的 Tuner,必须在此 dict 中添加键 “_name”,这有助于标识选中的元素。 相应的,这是从 NNI 获得的嵌套搜索空间定义[示例](https://github.com/microsoft/nni/tree/master/examples/trials/mnist-nested-search-space/sample.json)。 以下 Tuner 支持嵌套搜索空间:
* [nested] 搜索空间定义的简单[示例](https://github.com/microsoft/nni/tree/master/examples/trials/mnist-nested-search-space/search_space.json)。 如果选项列表中的元素是 dict,则它是一个子搜索空间,对于内置的 Tuner,必须在此 dict 中添加键 “_name”,这有助于标识选中的元素。 相应的,这是使用从 NNI 获得的嵌套搜索空间的[示例](https://github.com/microsoft/nni/tree/master/examples/trials/mnist-nested-search-space/sample.json)。 以下 Tuner 支持嵌套搜索空间:
* Random Search(随机搜索)
* TPE
* Anneal(退火算法)
* Evolution
* {"_type":"randint","_value":[upper]}
* {"_type":"randint","_value":[lower, upper]}
* 此变量为范围 [0, upper) 之间的随机整数。 这种分布的语义,在较远整数与附近整数之间的损失函数无太大关系, 这是用来描述随机种子的较好分布。 如果损失函数与较近的整数更相关,则应该使用某个"quantized"的连续分布,如quniform, qloguniform, qnormal 或 qlognormal。 注意,如果需要改动数字下限,可以使用 `quniform`
* 当前实现的是 "quniform" 的 "randint" 分布,随机变量的分布函数是 round(uniform(lower, upper))。 所选择值的类型是 float。 如果要使用整数,需要显式转换
* {"_type":"uniform","_value":[low, high]}
......@@ -92,9 +92,19 @@
| Hyperband Advisor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Metis Tuner | ✓ | ✓ | ✓ | ✓ | | | | | | |
注意,在 Grid Search Tuner 中,为了使用方便 `quniform``qloguniform` 的定义也有所改变,其中的 q 表示采样值的数量。 详情如下
已知的局限
* 类型 'quniform' 接收三个值 [low, high, q], 其中 [low, high] 指定了范围,而 'q' 指定了会被均匀采样的值的数量。 注意 q 至少为 2。 它的第一个采样值为 'low',每个采样值都会比前一个大 (high-low)/q 。
* 类型 'qloguniform' 的行为与 'quniform' 类似,不同处在于首先将范围改为 [log(low), log(high)] 采样后,再将数值还原。
* 注意,在 Grid Search Tuner 中,为了使用方便 `quniform``qloguniform` 的定义也有所改变,其中的 q 表示采样值的数量。 详情如下:
注意 Metis Tuner 当前仅支持在 `choice` 中使用数值。
\ No newline at end of file
* 类型 'quniform' 接收三个值 [low, high, q], 其中 [low, high] 指定了范围,而 'q' 指定了会被均匀采样的值的数量。 注意 q 至少为 2。 它的第一个采样值为 'low',每个采样值都会比前一个大 (high-low)/q 。
* 类型 'qloguniform' 的行为与 'quniform' 类似,不同处在于首先将范围改为 [log(low), log(high)] 采样后,再将数值还原。
* 注意 Metis Tuner 当前仅支持在 `choice` 中使用数值。
* 请注意,对于嵌套搜索空间:
* 只有 随机搜索/TPE/Anneal/Evolution Tuner 支持嵌套搜索空间
* 不支持嵌套搜索空间 "超参" 并行图,对其的改进通过 #1110(https://github.com/microsoft/nni/issues/1110) 来跟踪 。欢迎任何建议和贡献。
\ No newline at end of file
......@@ -4,3 +4,4 @@
.. toctree::
多阶段<MultiPhase>
高级网络架构搜索<AdvancedNas>
NAS 编程接口<GeneralNasInterfaces>
\ No newline at end of file
......@@ -4,6 +4,6 @@
.. toctree::
:maxdepth: 1
介绍<BuiltinAssessors>
介绍<BuiltinAssessor>
Medianstop<MedianstopAssessor>
Curvefitting<CurvefittingAssessor>
\ No newline at end of file
**在 NNI 中运行神经网络架构搜索**
===
参考 [NNI-NAS-Example](https://github.com/Crysple/NNI-NAS-Example),来使用贡献者提供的 NAS 接口。
谢谢可爱的贡献者!
欢迎越来越多的人加入我们!
\ No newline at end of file
......@@ -14,7 +14,7 @@
6. ADD-SKIP (在随机层之间一致).
7. REMOVE-SKIP (移除随机跳过).
![ga-squad-logo](../../../../examples/trials/ga_squad/ga_squad.png)
![ga-squad-logo](./ga_squad.png)
## 新版本
......
......@@ -79,9 +79,7 @@ def get_id(word_dict, word):
'''
Return word id.
'''
if word in word_dict.keys():
return word_dict[word]
return word_dict['<unk>']
return word_dict.get(word, word_dict['<unk>'])
def load_embedding(path):
......
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