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> { ...@@ -182,7 +182,8 @@ class Para extends React.Component<ParaProps, ParaState> {
// need to cut down the data // need to cut down the data
if (percent !== 0) { if (percent !== 0) {
const linesNum = paraData.data.length; 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; paraData.data.length = len;
} }
// need to swap the yAxis // need to swap the yAxis
...@@ -236,6 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -236,6 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> {
visualMapObj = { visualMapObj = {
type: 'continuous', type: 'continuous',
precision: 3, precision: 3,
min: 0,
max: max,
color: ['#CA0000', '#FFC400', '#90EE90'] color: ['#CA0000', '#FFC400', '#90EE90']
}; };
} else { } 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 ...@@ -54,4 +54,4 @@ python >= 3.5
please reference to the [NNI CTL document]. 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 @@ ...@@ -21,6 +21,7 @@
import ast import ast
import astor import astor
import numbers
# pylint: disable=unidiomatic-typecheck # pylint: disable=unidiomatic-typecheck
...@@ -87,8 +88,9 @@ class SearchSpaceGenerator(ast.NodeTransformer): ...@@ -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] args = [key.n if type(key) is ast.Num else key.s for key in node.args[0].keys]
else: else:
# arguments of other functions must be literal number # 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' assert all(isinstance(ast.literal_eval(astor.to_source(arg)), numbers.Real) for arg in node.args), \
args = [arg.n 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 key = self.module_name + '/' + name + '/' + func
# store key in ast.Call # 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