HpoExperimentConfig

名称类型描述示例值
object

CreateHpoExperiment API 的入参

params_configobject

params_config

params_src_dst_filepatharray

参数配置的源头路径和最终输出路径

params_src_dst_filepathstring

src 和 dst 路径字符串,用逗号隔开。

./local/path/foo.config,oss://bucket/remote/path/bar.config
platform_configobject

platform_config

namestring

用于标记任务执行的平台

DLC, MaxCompute,paiflow, etc
cmdarray

在后台计算平台上需要执行的命令列表

commandsstring

用于标记执行的命令

pai -name kmeans -project foo -Dseed 1
resumestring

用于用户一次运行时,比如说第一行任务成功,第二行由于资源不足失败,可以开启续跑,从第二行命令开始运行

0/1。 1表示启用。不填写不启用
metric_configobject

metric_config

metric_typestring

用户评价 trial 的指标类型,必须为 summary/table/json/stdout 之一。

table, summary, stdout,或者json
metric_sourcearray

metric_source

string

指标的来源,对于 oss 源,可以是一个文件路径;对于 MaxCompute 表格,需要是一个获取具体结果的 sql 语句。

对于table类型,为从Table获取metricMaxCompute语句,如:select count(*) as cnt from nni_test1_${exp_id}_${trial_id}; 对于summary类型,为summary所在路径,如:oss://test-nni/examples/search/pai/metric/metric_${exp_id}_${trial_id}/ 对于stdout类型,为从那一条cmd抽取metric,如:cmd1 (序号从1开始)
final_modestring

如任务运行过程中,存在很多中间 metric,那么需要确定最终 metric 的计算方式,取值必须为 final/best/avg 之一。

final, best, avg
metric_dictobject

当有多只指标需要同时考虑时,可以通过配置指标名称及对应权重的方式实现。注:权重可以为负值,权重之和可以不为 1,用户自定义。

{'auc':0.25, 'recall':0.5, 'precision':0.25}
source_list_final_modestring

可选,默认值为 final_mode,可选值为 final/best/avg,用于有多个 metric_source 时最终 metric 如何计算

avg
oss_configobject

oss 配置

endpointstring

endpoint

http://oss-cn-beijing.aliyuncs.com
accessKeyIDstring

accessKeyID

ak字符串
accessKeySecretstring

accessKeySecret

sk字符串
role_arnstring

PAIAutoML 服务关联角色。填写该值后,可不提供 ak/sk。

acs:ram::xxx:role/aliyunserviceroleforpaiautoml
odps_configobject

MaxCompute 相关配置

access_idstring

access_id

ak字符串
access_keystring

access_key

sk字符串
project_namestring

maxcompute 项目名称

my_project_x
end_pointstring

end_point

http://service.cn-beijing.maxcompute.aliyun.com/api
log_view_hoststring

log_view_host

http://logview.odps.aliyun.com
regionstring

region

cn-hangzhou / cn-beijing / cn-shanghai / cn-shenzhen / cn-hongkong
role_arnstring

PAIAutoML 服务关联角色。填写该值后,可不提供 ak/sk。

acs:ram::xxx:role/aliyunserviceroleforpaiautoml
ts_configobject

ts_config

access_key_idstring

access_key_id

ak字符串
access_key_secretstring

access_key_secret

sk字符串
region_idstring

region_id

cn-hangzhou / cn-beijing / cn-shanghai / cn-shenzhen / cn-hongkong
endpointstring

endpoint

pai.cn-shanghai.aliyuncs.com
paiflow_configobject

paiflow_config

access_key_idstring

access_key_id

ak字符串
access_key_secretstring

access_key_secret

sk字符串
region_idstring

region_id

cn-hangzhou / cn-beijing / cn-shanghai / cn-shenzhen / cn-hongkong
workspace_idstring

PAI 工作空间 workspace ID

12345
yml_configobject

HPO 运行时配置

trial_concurrencyinteger

最大的 trial 并发数

5
max_trial_numberinteger

一个实验最多可运行的 trial 数量。实验可能在还没运行到这么多 trials 时就结束了。

20
experiment_namestring

实验名称

my_hpo_exp_3
tunerobject

超参调优使用的算法

namestring

超参调优使用的算法名称

TPE
class_argsobject

超参调优算法使用到的参数

debugboolean

debug 开启标记

false/true
log_levelstring

日志级别

debug
assessorobject

assessor

namestring

评估使用的类名称。

PAIAssessor
class_argsobject

class_args

proportionfloat

本次超参搜索的最优值和历史记录的 proportion 值比较

0.5
start_stepinteger

从第几步开始进行早停判定

2
moving_avgstring

早停判断时,采用所有历史的滑动平均值作为判断标准

true
optimize_modestring

优化的方向

maximize/minimize
earlystopboolean

是否开启 earlystop

True, False
search_spaceobject

超参所搜空间,json 字符串。

{ "${tree_count}":{"_type":"choice","_value":[5,10,3]}, "${max_depth}":{"_type":"randint","_value":[3,6]} }
k8s_configobject

不需要配置

nni_container_requested_memorystring

nni_container_requested_memory

不需要配置
nni_container_requested_cpustring

nni_container_requested_cpu

不需要配置
nni_container_memory_limitstring

nni_container_memory_limit

不需要配置
nni_container_cpu_limitstring

nni_container_cpu_limit

不需要配置
dlc_configobject

dlc_config

access_idstring

access_id

ak字符串
access_keystring

access_key

sk字符串
endpointstring

endpoint

pai-dlc.cn-shanghai.aliyuncs.com
regionstring

region

cn-hangzhou / cn-beijing / cn-shanghai / cn-shenzhen / cn-hongkong
protocolstring

protocol

https
schedule_configobject

schedule_config

daystring

day

everyday
start_timestring

start_time

11:10
end_timestring

end_time

23:56
monitor_configobject

钉钉群监控配置

urlstring

url 为创建自定义机器人对应的 Webhook 地址

https://oapi.dingtalk.com/robot/send?access_token=${UID} 参考https://open.dingtalk.com/document/robots/custom-robot-access去添加自定义机器人,获取url
keywordstring

添加自定义机器人:自定义关键词

monitor
at_mobilesstring

在监控内容里添加@人的手机号,且只有在群内的成员才可被@,非群内成员手机号会被脱敏

[1472583690]
at_user_idsstring

被@人的用户 userid。

[1234567890]
is_at_allstring

是否@所有人

True/False
output_configobject

output_config

model_pathstring

如果使用服务版,可以配置 model_path 用来获取最优模型

oss://bucket/foo/bar/model/model_${exp_id}_${trial_id}
summary_pathstring

如果使用单机版,可以配置 summary 用于本地查看 TensorBoard

oss://bucket/foo/bar/model_${exp_id}_${trial_id}/