Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
A-Tune
提交
fe03b0b2
A
A-Tune
项目概览
openeuler
/
A-Tune
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
A-Tune
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe03b0b2
编写于
8月 18, 2020
作者:
X
Xiaoguang Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
atune: add noise and sel_feature configs
上级
075aaa7a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
30 addition
and
1 deletion
+30
-1
analysis/engine/optimizer.py
analysis/engine/optimizer.py
+3
-1
analysis/engine/parser.py
analysis/engine/parser.py
+4
-0
common/config/config.go
common/config/config.go
+10
-0
common/models/optimizer.go
common/models/optimizer.go
+2
-0
common/tuning/optimizer.go
common/tuning/optimizer.go
+5
-0
misc/atuned.cnf
misc/atuned.cnf
+6
-0
未找到文件。
analysis/engine/optimizer.py
浏览文件 @
fe03b0b2
...
@@ -64,7 +64,9 @@ class Optimizer(Resource):
...
@@ -64,7 +64,9 @@ class Optimizer(Resource):
engine
=
optimizer
.
Optimizer
(
task_id
,
args
[
"knobs"
],
child_conn
,
engine
=
args
.
get
(
"engine"
),
engine
=
optimizer
.
Optimizer
(
task_id
,
args
[
"knobs"
],
child_conn
,
engine
=
args
.
get
(
"engine"
),
max_eval
=
args
.
get
(
"max_eval"
),
max_eval
=
args
.
get
(
"max_eval"
),
n_random_starts
=
args
.
get
(
"random_starts"
),
n_random_starts
=
args
.
get
(
"random_starts"
),
x0
=
x_ref
,
y0
=
y_ref
,
split_count
=
args
.
get
(
"split_count"
))
x0
=
x_ref
,
y0
=
y_ref
,
split_count
=
args
.
get
(
"split_count"
),
noise
=
args
.
get
(
"noise"
),
sel_feature
=
args
.
get
(
"feature_filter"
)
or
args
.
get
(
"sel_feature"
))
engine
.
start
()
engine
.
start
()
value
=
{}
value
=
{}
...
...
analysis/engine/parser.py
浏览文件 @
fe03b0b2
...
@@ -36,6 +36,10 @@ OPTIMIZER_POST_PARSER.add_argument('feature_filter', type=bool, location='json',
...
@@ -36,6 +36,10 @@ OPTIMIZER_POST_PARSER.add_argument('feature_filter', type=bool, location='json',
help
=
"the feature_filter enabled"
)
help
=
"the feature_filter enabled"
)
OPTIMIZER_POST_PARSER
.
add_argument
(
'split_count'
,
type
=
int
,
location
=
'json'
,
OPTIMIZER_POST_PARSER
.
add_argument
(
'split_count'
,
type
=
int
,
location
=
'json'
,
help
=
"split_count cannot be null"
)
help
=
"split_count cannot be null"
)
OPTIMIZER_POST_PARSER
.
add_argument
(
'sel_feature'
,
type
=
bool
,
location
=
'json'
,
help
=
"enable the feature selection or not"
)
OPTIMIZER_POST_PARSER
.
add_argument
(
'noise'
,
type
=
float
,
location
=
'json'
,
help
=
"the noise can not be null"
)
OPTIMIZER_PUT_PARSER
=
reqparse
.
RequestParser
()
OPTIMIZER_PUT_PARSER
=
reqparse
.
RequestParser
()
OPTIMIZER_PUT_PARSER
.
add_argument
(
'iterations'
,
type
=
int
,
required
=
True
,
OPTIMIZER_PUT_PARSER
.
add_argument
(
'iterations'
,
type
=
int
,
required
=
True
,
...
...
common/config/config.go
浏览文件 @
fe03b0b2
...
@@ -114,6 +114,12 @@ var (
...
@@ -114,6 +114,12 @@ var (
TLSHTTPCACertFile
string
TLSHTTPCACertFile
string
)
)
// the tuning configs
var
(
Noise
float64
SelFeature
bool
)
// the system config in atuned.cnf
// the system config in atuned.cnf
var
(
var
(
Network
string
Network
string
...
@@ -188,6 +194,10 @@ func (c *Cfg) Load() error {
...
@@ -188,6 +194,10 @@ func (c *Cfg) Load() error {
Network
=
net
Network
=
net
}
}
section
=
cfg
.
Section
(
"tuning"
)
Noise
=
section
.
Key
(
"noise"
)
.
MustFloat64
(
0.000000001
)
SelFeature
=
section
.
Key
(
"sel_feature"
)
.
MustBool
(
false
)
if
err
:=
initLogging
(
cfg
);
err
!=
nil
{
if
err
:=
initLogging
(
cfg
);
err
!=
nil
{
return
err
return
err
}
}
...
...
common/models/optimizer.go
浏览文件 @
fe03b0b2
...
@@ -31,6 +31,8 @@ type OptimizerPostBody struct {
...
@@ -31,6 +31,8 @@ type OptimizerPostBody struct {
Yref
[]
string
`json:"y_ref,omitempty"`
Yref
[]
string
`json:"y_ref,omitempty"`
FeatureFilter
bool
`json:"feature_filter"`
FeatureFilter
bool
`json:"feature_filter"`
SplitCount
int32
`json:"split_count"`
SplitCount
int32
`json:"split_count"`
Noise
float64
`json:"noise"`
SelFeature
bool
`json:"sel_feature"`
}
}
// Knob body store the tuning properties
// Knob body store the tuning properties
...
...
common/tuning/optimizer.go
浏览文件 @
fe03b0b2
...
@@ -131,7 +131,9 @@ func (o *Optimizer) createOptimizerTask(ch chan *PB.TuningMessage, iters int32,
...
@@ -131,7 +131,9 @@ func (o *Optimizer) createOptimizerTask(ch chan *PB.TuningMessage, iters int32,
optimizerBody
.
Engine
=
engine
optimizerBody
.
Engine
=
engine
optimizerBody
.
RandomStarts
=
o
.
RandomStarts
optimizerBody
.
RandomStarts
=
o
.
RandomStarts
optimizerBody
.
FeatureFilter
=
o
.
FeatureFilter
optimizerBody
.
FeatureFilter
=
o
.
FeatureFilter
optimizerBody
.
SelFeature
=
config
.
SelFeature
optimizerBody
.
SplitCount
=
o
.
SplitCount
optimizerBody
.
SplitCount
=
o
.
SplitCount
optimizerBody
.
Noise
=
config
.
Noise
optimizerBody
.
Knobs
=
make
([]
models
.
Knob
,
0
)
optimizerBody
.
Knobs
=
make
([]
models
.
Knob
,
0
)
for
_
,
item
:=
range
o
.
Prj
.
Object
{
for
_
,
item
:=
range
o
.
Prj
.
Object
{
if
item
.
Info
.
Skip
{
if
item
.
Info
.
Skip
{
...
@@ -361,6 +363,9 @@ func (o *Optimizer) matchRelations(optStr string) bool {
...
@@ -361,6 +363,9 @@ func (o *Optimizer) matchRelations(optStr string) bool {
func
(
o
*
Optimizer
)
filterParams
()
(
string
,
error
)
{
func
(
o
*
Optimizer
)
filterParams
()
(
string
,
error
)
{
log
.
Infof
(
"params importance weight is: %s"
,
o
.
RespPutIns
.
Rank
)
log
.
Infof
(
"params importance weight is: %s"
,
o
.
RespPutIns
.
Rank
)
if
strings
.
TrimSpace
(
o
.
RespPutIns
.
Rank
)
==
""
{
return
""
,
nil
}
sortedParams
:=
make
(
utils
.
SortedPair
,
0
)
sortedParams
:=
make
(
utils
.
SortedPair
,
0
)
paramList
:=
strings
.
Split
(
o
.
RespPutIns
.
Rank
,
","
)
paramList
:=
strings
.
Split
(
o
.
RespPutIns
.
Rank
,
","
)
...
...
misc/atuned.cnf
浏览文件 @
fe03b0b2
...
@@ -79,3 +79,9 @@ disk = sda
...
@@ -79,3 +79,9 @@ disk = sda
network = enp189s0f0
network = enp189s0f0
user = root
user = root
#################################### tuning ###############################
# tuning configs
[tuning]
noise = 0.000000001
sel_feature = false
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录