Skip to content

Commit

Permalink
update hpo docs (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjjinjie authored Sep 19, 2022
1 parent ff1780d commit 97af5b0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Binary file added docs/images/automl/nni_metric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/automl/nni_stop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 23 additions & 3 deletions docs/source/automl/pai_nni_hpo.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ python setup.py install
### 下载安装hpo-tools

```
pip install https://automl-nni.oss-cn-beijing.aliyuncs.com/nni/hpo_tools/hpo_tools-0.1.0-py3-none-any.whl
wget https://automl-nni.oss-cn-beijing.aliyuncs.com/nni/hpo_tools/download_examples.py
python download_examples.py
wget https://automl-nni.oss-cn-beijing.aliyuncs.com/nni/hpo_tools/scripts/install_hpo_tools.sh
bash install_hpo_tools.sh
cd examples/search/maxcompute_easyrec
```

Expand Down Expand Up @@ -226,6 +225,27 @@ auc_is_valid_play=1
点击每个Trial No,可以看到每个参数Trial的日志、参数详情,报错和输出可以点击以下3个按钮。
![image.png](../../images/automl/pai_nni_log.jpg)

### 手动停止某组实验超参

如果某些参数的结果不太好,可以进行手动停止。
例如停止第一组参数。
![image.png](../../images/automl/nni_stop.png)

### 多目标default metric查看

假设用户配置的metric_config为如下,那么UI中Default metric中显示3项;该组trial最终的metric

- default=auc\*0.5+accuracy\*0.5
- auc即为最终的auc值
- accuracy即为最终的accuracy值

```
auc=0.5
accuracy=0.5
```

![image.png](../../images/automl/nni_metric.png)

## finetune训练(可选)

由于推荐业务每天都有实时更新的数据,如果用户采用先训练一批历史数据,后面每天finetune更新模型的话,可以利用以上begin调优的最优结果,再在新数据上微调。如果用户每次更新模型都是重新开始训练的话,则不需要此步骤。
Expand Down
2 changes: 1 addition & 1 deletion easy_rec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import logging
import os
import sys
import platform
import sys

import tensorflow as tf

Expand Down
1 change: 1 addition & 0 deletions easy_rec/python/ops/gen_kafka_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
if os.path.exists(kafka_ops_path):
kafka_module = tf.load_op_library(kafka_ops_path)


@tf_export('io_kafka_dataset_v2')
def io_kafka_dataset_v2(topics,
servers,
Expand Down

0 comments on commit 97af5b0

Please sign in to comment.