Commit ae7a72bc authored by Hongarc's avatar Hongarc Committed by Chi Song
Browse files

Remove all whitespace at end of line (#1162)

parent 14c1b31c
...@@ -109,7 +109,7 @@ interface FinalResult { ...@@ -109,7 +109,7 @@ interface FinalResult {
} }
export { export {
TableObj, Parameters, Experiment, TableObj, Parameters, Experiment,
AccurPoint, TrialNumber, TrialJob, AccurPoint, TrialNumber, TrialJob,
DetailAccurPoint, TooltipForAccuracy, DetailAccurPoint, TooltipForAccuracy,
ParaObj, Dimobj, FinalResult, FinalType, ParaObj, Dimobj, FinalResult, FinalType,
......
...@@ -41,7 +41,7 @@ $bgColor: #f2f2f2; ...@@ -41,7 +41,7 @@ $bgColor: #f2f2f2;
color: #212121; color: #212121;
background-color: #fff; background-color: #fff;
cursor: pointer; cursor: pointer;
border: none; border: none;
} }
.logcontent{ .logcontent{
height: 100%; height: 100%;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.overGraph{ .overGraph{
height: 362px; height: 362px;
.accuracy{ .accuracy{
width: 100%; width: 100%;
height: 324px; height: 324px;
......
...@@ -53,7 +53,7 @@ $titleBgcolor: #b3b3b3; ...@@ -53,7 +53,7 @@ $titleBgcolor: #b3b3b3;
.minTitle{ .minTitle{
border-right: 2px solid #fff; border-right: 2px solid #fff;
} }
.title:hover{ .title:hover{
cursor: pointer; cursor: pointer;
} }
......
.parameter{ .parameter{
height: 100%; height: 100%;
} }
.meline{ .meline{
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
.searcHyper{ .searcHyper{
position: relative; position: relative;
margin: 0 19px; margin: 0 19px;
.noneData{ .noneData{
position: absolute; position: absolute;
left: 49%; left: 49%;
top: 2.5%; top: 2.5%;
font-size: 13px; font-size: 13px;
color: #999; color: #999;
} }
} }
/* Intermediate Result Style */ /* Intermediate Result Style */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
border-top-left-radius: 12px; border-top-left-radius: 12px;
border-bottom-left-radius: 12px; border-bottom-left-radius: 12px;
} }
.showProgress{ .showProgress{
height: 30px; height: 30px;
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
/* add the brother selector to increase the priority */ /* add the brother selector to increase the priority */
#succeTable .commonTableStyle, #tableList .commonTableStyle { #succeTable .commonTableStyle, #tableList .commonTableStyle {
tr{ tr{
text-align: center; text-align: center;
color:#212121; color:#212121;
font-family: 'Segoe'; font-family: 'Segoe';
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
border-bottom: 1px solid #d0d0d0; border-bottom: 1px solid #d0d0d0;
text-align: center; text-align: center;
} }
.ant-table-expanded-row{ .ant-table-expanded-row{
/* background-color: #f2f2f2 */ /* background-color: #f2f2f2 */
background-color: transparent; background-color: transparent;
} }
tr:hover{ tr:hover{
/* cancel antd table default hover style */ /* cancel antd table default hover style */
td{ td{
background-color: transparent; background-color: transparent;
......
...@@ -4,7 +4,7 @@ trialConcurrency: 3 ...@@ -4,7 +4,7 @@ trialConcurrency: 3
maxExecDuration: 1h maxExecDuration: 1h
maxTrialNum: 10 maxTrialNum: 10
#choice: local, remote, pai #choice: local, remote, pai
trainingServicePlatform: remote trainingServicePlatform: remote
#choice: true, false #choice: true, false
useAnnotation: false useAnnotation: false
multiThread: true multiThread: true
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
{ {
"_type" : "choice", "_type" : "choice",
"_value" : [1, 100] "_value" : [1, 100]
} }
} }
\ No newline at end of file
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
{ {
"_type" : "choice", "_type" : "choice",
"_value" : [1, 100] "_value" : [1, 100]
} }
} }
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"_value" : [{"optimizer": "Adam", "learning_rate": 0.00001}, "_value" : [{"optimizer": "Adam", "learning_rate": 0.00001},
{"optimizer": "Adam", "learning_rate": 0.0001}, {"optimizer": "Adam", "learning_rate": 0.0001},
{"optimizer": "Adam", "learning_rate": 0.001}, {"optimizer": "Adam", "learning_rate": 0.001},
{"optimizer": "SGD", "learning_rate": 0.01}, {"optimizer": "SGD", "learning_rate": 0.01},
{"optimizer": "SGD", "learning_rate": 0.005}, {"optimizer": "SGD", "learning_rate": 0.005},
{"optimizer": "SGD", "learning_rate": 0.0002}] {"optimizer": "SGD", "learning_rate": 0.0002}]
} }
} }
\ No newline at end of file
...@@ -69,7 +69,7 @@ def get_metric_results(metrics): ...@@ -69,7 +69,7 @@ def get_metric_results(metrics):
elif metric['type'] == 'FINAL': elif metric['type'] == 'FINAL':
final_result.append(metric['data']) final_result.append(metric['data'])
print(intermediate_result, final_result) print(intermediate_result, final_result)
return [round(float(x),6) for x in intermediate_result], [round(float(x), 6) for x in final_result] return [round(float(x),6) for x in intermediate_result], [round(float(x), 6) for x in final_result]
def get_max_values(config_file): def get_max_values(config_file):
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
{ {
"_type" : "choice", "_type" : "choice",
"_value" : [1, 100] "_value" : [1, 100]
} }
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ import nni ...@@ -4,7 +4,7 @@ import nni
if __name__ == '__main__': if __name__ == '__main__':
hyper_params = nni.get_next_parameter() hyper_params = nni.get_next_parameter()
for i in range(10): for i in range(10):
nni.report_intermediate_result(0.1*(i+1)) nni.report_intermediate_result(0.1*(i+1))
time.sleep(2) time.sleep(2)
nni.report_final_result(1.0) nni.report_final_result(1.0)
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
* When the experiment is done, meaning it is successfully done in this case, `Experiment done` can be detected in the nni_manager.log file. * When the experiment is done, meaning it is successfully done in this case, `Experiment done` can be detected in the nni_manager.log file.
## Issues ## Issues
* Private APIs are used to detect whether tuner and assessor have terminated successfully. * Private APIs are used to detect whether tuner and assessor have terminated successfully.
* The output of REST server is not tested. * The output of REST server is not tested.
* Remote machine training service is not tested. * Remote machine training service is not tested.
\ No newline at end of file
...@@ -62,7 +62,7 @@ def start_container(image, name, nnimanager_os): ...@@ -62,7 +62,7 @@ def start_container(image, name, nnimanager_os):
file.write(str(port)) file.write(str(port))
def stop_container(name): def stop_container(name):
'''Stop docker container''' '''Stop docker container'''
stop_cmds = ['docker', 'container', 'stop', name] stop_cmds = ['docker', 'container', 'stop', name]
check_call(stop_cmds) check_call(stop_cmds)
rm_cmds = ['docker', 'container', 'rm', name] rm_cmds = ['docker', 'container', 'rm', name]
......
...@@ -6,7 +6,7 @@ $CWD = $PWD ...@@ -6,7 +6,7 @@ $CWD = $PWD
echo "" echo ""
echo "===========================Testing: nni_annotation===========================" echo "===========================Testing: nni_annotation==========================="
cd $CWD/../tools/ cd $CWD/../tools/
python -m unittest -v nni_annotation/test_annotation.py python -m unittest -v nni_annotation/test_annotation.py
## Export certain environment variables for unittest code to work ## Export certain environment variables for unittest code to work
$env:NNI_TRIAL_JOB_ID="test_trial_job_id" $env:NNI_TRIAL_JOB_ID="test_trial_job_id"
......
## NNI CTL ## NNI CTL
The NNI CTL module is used to control Neural Network Intelligence, including start a new experiment, stop an experiment and update an experiment etc. The NNI CTL module is used to control Neural Network Intelligence, including start a new experiment, stop an experiment and update an experiment etc.
## Environment ## Environment
``` ```
...@@ -9,7 +9,7 @@ python >= 3.5 ...@@ -9,7 +9,7 @@ python >= 3.5
## Installation ## Installation
1. Enter tools directory 1. Enter tools directory
1. Use pip to install packages 1. Use pip to install packages
* Install for current user: * Install for current user:
...@@ -24,17 +24,17 @@ python >= 3.5 ...@@ -24,17 +24,17 @@ python >= 3.5
python3 -m pip install -e . python3 -m pip install -e .
``` ```
1. Change the mode of nnictl file 1. Change the mode of nnictl file
```bash ```bash
chmod +x ./nnictl chmod +x ./nnictl
``` ```
1. Add nnictl to your PATH system environment variable. 1. Add nnictl to your PATH system environment variable.
* You could use `export` command to set PATH variable temporary. * You could use `export` command to set PATH variable temporary.
export PATH={your nnictl path}:$PATH export PATH={your nnictl path}:$PATH
* Or you could edit your `/etc/profile` file. * Or you could edit your `/etc/profile` file.
......
# NNI Annotation # NNI Annotation
## Overview ## Overview
To improve user experience and reduce user effort, we design an annotation grammar. Using NNI annotation, users can adapt their code to NNI just by adding some standalone annotating strings, which does not affect the execution of the original code. To improve user experience and reduce user effort, we design an annotation grammar. Using NNI annotation, users can adapt their code to NNI just by adding some standalone annotating strings, which does not affect the execution of the original code.
Below is an example: Below is an example:
...@@ -28,7 +28,7 @@ In NNI, there are mainly four types of annotation: ...@@ -28,7 +28,7 @@ In NNI, there are mainly four types of annotation:
**Arguments** **Arguments**
- **sampling_algo**: Sampling algorithm that specifies a search space. User should replace it with a built-in NNI sampling function whose name consists of an `nni.` identification and a search space type specified in [SearchSpaceSpec](https://nni.readthedocs.io/en/latest/SearchSpaceSpec.html) such as `choice` or `uniform`. - **sampling_algo**: Sampling algorithm that specifies a search space. User should replace it with a built-in NNI sampling function whose name consists of an `nni.` identification and a search space type specified in [SearchSpaceSpec](https://nni.readthedocs.io/en/latest/SearchSpaceSpec.html) such as `choice` or `uniform`.
- **name**: The name of the variable that the selected value will be assigned to. Note that this argument should be the same as the left value of the following assignment statement. - **name**: The name of the variable that the selected value will be assigned to. Note that this argument should be the same as the left value of the following assignment statement.
There are 10 types to express your search space as follows: There are 10 types to express your search space as follows:
......
...@@ -33,7 +33,7 @@ __all__ = ['generate_search_space', 'expand_annotations'] ...@@ -33,7 +33,7 @@ __all__ = ['generate_search_space', 'expand_annotations']
slash = '/' slash = '/'
if sys.platform == "win32": if sys.platform == "win32":
slash = '\\' slash = '\\'
def generate_search_space(code_dir): def generate_search_space(code_dir):
"""Generate search space from Python source code. """Generate search space from Python source code.
...@@ -41,7 +41,7 @@ def generate_search_space(code_dir): ...@@ -41,7 +41,7 @@ def generate_search_space(code_dir):
code_dir: directory path of source files (str) code_dir: directory path of source files (str)
""" """
search_space = {} search_space = {}
if code_dir.endswith(slash): if code_dir.endswith(slash):
code_dir = code_dir[:-1] code_dir = code_dir[:-1]
...@@ -84,7 +84,7 @@ def expand_annotations(src_dir, dst_dir, exp_id='', trial_id=''): ...@@ -84,7 +84,7 @@ def expand_annotations(src_dir, dst_dir, exp_id='', trial_id=''):
""" """
if src_dir[-1] == slash: if src_dir[-1] == slash:
src_dir = src_dir[:-1] src_dir = src_dir[:-1]
if dst_dir[-1] == slash: if dst_dir[-1] == slash:
dst_dir = dst_dir[:-1] dst_dir = dst_dir[:-1]
......
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