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

Merge pull request #17 from microsoft/master

pull code
parents 58fd0c84 31dc58e9
......@@ -182,7 +182,8 @@ class Para extends React.Component<ParaProps, ParaState> {
// need to cut down the data
if (percent !== 0) {
const linesNum = paraData.data.length;
const len = Math.floor(linesNum * percent);
// Math.ceil rather than Math.floor to avoid lost lines
const len = Math.ceil(linesNum * percent);
paraData.data.length = len;
}
// need to swap the yAxis
......@@ -236,6 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> {
visualMapObj = {
type: 'continuous',
precision: 3,
min: 0,
max: max,
color: ['#CA0000', '#FFC400', '#90EE90']
};
} else {
......
authorName: nni
experimentName: default_test
maxExecDuration: 5m
maxTrialNum: 4
trialConcurrency: 2
searchSpacePath: ../../../examples/trials/mnist-cascading-search-space/search_space.json
tuner:
#choice: TPE, Random, Anneal, Evolution
builtinTunerName: TPE
assessor:
builtinAssessorName: Medianstop
classArgs:
optimize_mode: maximize
trial:
codeDir: ../../../examples/trials/mnist-cascading-search-space
command: python3 mnist.py --batch_num 100
gpuNum: 0
useAnnotation: false
multiPhase: false
multiThread: false
trainingServicePlatform: local
......@@ -54,4 +54,4 @@ python >= 3.5
please reference to the [NNI CTL document].
[NNI CTL document]: ../docs/en_US/NNICTLDOC.md
[NNI CTL document]: ../docs/en_US/Nnictl.md
......@@ -21,6 +21,7 @@
import ast
import astor
import numbers
# pylint: disable=unidiomatic-typecheck
......@@ -87,8 +88,9 @@ class SearchSpaceGenerator(ast.NodeTransformer):
args = [key.n if type(key) is ast.Num else key.s for key in node.args[0].keys]
else:
# arguments of other functions must be literal number
assert all(type(arg) is ast.Num for arg in node.args), 'Smart parameter\'s arguments must be number literals'
args = [arg.n for arg in node.args]
assert all(isinstance(ast.literal_eval(astor.to_source(arg)), numbers.Real) for arg in node.args), \
'Smart parameter\'s arguments must be number literals'
args = [ast.literal_eval(astor.to_source(arg)) for arg in node.args]
key = self.module_name + '/' + name + '/' + func
# store key in ast.Call
......
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