Skip to content

Commit

Permalink
Merge pull request #68 from Microsoft/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
SparkSnail authored Nov 14, 2018
2 parents c280ba5 + 5b24f04 commit 898b469
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 193 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,17 @@ You can use these commands to get more information about the experiment
</table>

## **Documentation**
* [Overview](docs/Overview.md)
* [Get started](docs/GetStarted.md)
* [NNI overview](docs/Overview.md)
* [Quick start](docs/GetStarted.md)

## **How to**
* [Installation](docs/InstallNNI_Ubuntu.md)
* [Install NNI](docs/InstallNNI_Ubuntu.md)
* [Use command line tool nnictl](docs/NNICTLDOC.md)
* [Use NNIBoard](docs/WebUI.md)
* [How to define search space](docs/SearchSpaceSpec.md)
* [How to define a trial](docs/howto_1_WriteTrial.md)
* [Config an experiment](docs/ExperimentConfig.md)
* [Use annotation](docs/AnnotationSpec.md)
* [Debug](docs/HowToDebug.md)
* [How to use annotation](docs/howto_1_WriteTrial.md#nni-python-annotation)
## **Tutorials**
* [Run an experiment on local (with multiple GPUs)?](docs/tutorial_1_CR_exp_local_api.md)
* [Run an experiment on multiple machines?](docs/tutorial_2_RemoteMachineMode.md)
Expand Down
7 changes: 4 additions & 3 deletions docs/GetStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ An experiment is to run multiple trial jobs, each trial job tries a configuratio

python3 ~/nni/examples/trials/mnist-annotation/mnist.py

This command will be filled in the yaml configure file below. Please refer to [here]() for how to write your own trial.
This command will be filled in the yaml configure file below. Please refer to [here](howto_1_WriteTrial.md) for how to write your own trial.

**Prepare tuner**: NNI supports several popular automl algorithms, including Random Search, Tree of Parzen Estimators (TPE), Evolution algorithm etc. Users can write their own tuner (refer to [here](howto_2_CustomizedTuner.md), but for simplicity, here we choose a tuner provided by NNI as below:

Expand All @@ -43,7 +43,7 @@ This command will be filled in the yaml configure file below. Please refer to [h
classArgs:
optimize_mode: maximize

*builtinTunerName* is used to specify a tuner in NNI, *classArgs* are the arguments pass to the tuner (the spec of builtin tuners can be found [here]()), *optimization_mode* is to indicate whether you want to maximize or minimize your trial's result.
*builtinTunerName* is used to specify a tuner in NNI, *classArgs* are the arguments pass to the tuner, *optimization_mode* is to indicate whether you want to maximize or minimize your trial's result.

**Prepare configure file**: Since you have already known which trial code you are going to run and which tuner you are going to use, it is time to prepare the yaml configure file. NNI provides a demo configure file for each trial example, `cat ~/nni/examples/trials/mnist-annotation/config.yml` to see it. Its content is basically shown below:

Expand Down Expand Up @@ -86,7 +86,8 @@ You can refer to [here](NNICTLDOC.md) for more usage guide of *nnictl* command l
## View experiment results
The experiment has been running now, NNI provides WebUI for you to view experiment progress, to control your experiment, and some other appealing features. The WebUI is opened by default by `nnictl create`.

## Further reading
## Read more
* [Tuners supported in the latest NNI release](../src/sdk/pynni/nni/README.md)
* [Overview](Overview.md)
* [Installation](InstallNNI_Ubuntu.md)
* [Use command line tool nnictl](NNICTLDOC.md)
Expand Down
33 changes: 10 additions & 23 deletions docs/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning experiments. For each experiment, user only need to define a search space and update a few lines of code, and then leverage NNI build-in algorithms and training services to search the best hyper parameters and/or neural architecture.

>Step 1: [Define search space](SearchSpaceSpec.md)
>Step 2: [Update model codes](howto_1_WriteTrial.md)
>Step 3: [Define Experiment](ExperimentConfig.md)

<p align="center">
<img src="./img/3_steps.jpg" alt="drawing"/>
</p>
Expand All @@ -15,11 +22,6 @@ After user submits the experiment through a command line tool [nnictl](../tools/

User can use the nnictl and/or a visualized Web UI nniboard to monitor and debug a given experiment.

<p align="center">
<img src="./img/overview.jpg" alt="drawing"/>
</p>


NNI provides a set of examples in the package to get you familiar with the above process. In the following example [/examples/trials/mnist], we had already set up the configuration and updated the training codes for you. You can directly run the following command to start an experiment.

## Key Concepts
Expand All @@ -35,28 +37,13 @@ NNI provides a set of examples in the package to get you familiar with the above
### **Assessor**
**Assessor** in NNI is an implementation of Assessor API for optimizing the execution of experiment.


## Learn More
* [Get started](GetStarted.md)
### **How to**
* [Installation](InstallNNI_Ubuntu.md)
* [Install NNI](InstallNNI_Ubuntu.md)
* [Use command line tool nnictl](NNICTLDOC.md)
* [Use NNIBoard](WebUI.md)
* [Define search space](InstallNNI_Ubuntu.md)
* [Use NNI sdk] - *coming soon*
* [Config an experiment](SearchSpaceSpec.md)
* [Use annotation](AnnotationSpec.md)
* [Debug](HowToDebug.md)
* [Use annotation](howto_1_WriteTrial.md#nni-python-annotation)
### **Tutorials**
* [How to run an experiment on local (with multiple GPUs)?](tutorial_1_CR_exp_local_api.md)
* [How to run an experiment on multiple machines?](tutorial_2_RemoteMachineMode.md)
* [How to run an experiment on OpenPAI?](PAIMode.md)
* [Try different tuners and assessors] - *coming soon*
* [How to run an experiment on K8S services?] - *coming soon*
* [Implement a customized tuner] - *coming soon*
* [Implement a customized assessor] - *coming soon*
* [Implement a custmoized weight sharing algorithm] - *coming soon*
* [How to integrate NNI with your own custmoized training service] - *coming soon*
### **Best practice**
* [Compare different AutoML algorithms] - *coming soon*
* [Serve NNI as a capability of a ML Platform] - *coming soon*
* [How to run an experiment on OpenPAI?](PAIMode.md)
94 changes: 0 additions & 94 deletions src/webui/src/components/Tensor.tsx

This file was deleted.

54 changes: 51 additions & 3 deletions src/webui/src/components/TrialsDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import axios from 'axios';
import { MANAGER_IP } from '../static/const';
import { Row, Tabs } from 'antd';
import { Row, Col, Button, Tabs, Input } from 'antd';
const Search = Input.Search;
import { TableObj, Parameters, AccurPoint } from '../static/interface';
import Accuracy from './overview/Accuracy';
import Duration from './trial-detail/Duration';
Expand All @@ -22,6 +23,7 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
public _isMounted = false;
public interAccuracy = 0;
public interTableList = 1;

constructor(props: {}) {
super(props);

Expand All @@ -30,7 +32,6 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
accNodata: '',
tableListSource: []
};

}
// trial accuracy graph
drawPointGraph = () => {
Expand Down Expand Up @@ -202,11 +203,38 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
}
}

// search a specific trial by trial No.
searchTrialNo = (value: string) => {

window.clearInterval(this.interTableList);
const { tableListSource } = this.state;
const searchResultList: Array<TableObj> = [];
Object.keys(tableListSource).map(key => {
const item = tableListSource[key];
if (item.sequenceId.toString() === value) {
searchResultList.push(item);
}
});
this.setState(() => ({
tableListSource: searchResultList
}));
}

// reset btn click: rerender table
resetRenderTable = () => {

const searchInput = document.getElementById('searchTrial') as HTMLInputElement;
if (searchInput !== null) {
searchInput.value = '';
}
this.drawTableList();
this.interTableList = window.setInterval(this.drawTableList, 10000);
}
componentDidMount() {

this._isMounted = true;
this.drawPointGraph();
this.drawTableList();
this.drawPointGraph();
this.interAccuracy = window.setInterval(this.drawPointGraph, 10000);
this.interTableList = window.setInterval(this.drawTableList, 10000);
}
Expand Down Expand Up @@ -253,6 +281,26 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
</Tabs>
</div>
{/* trial table list */}
<Row className="allList">
<Col span={12}>
<Title1 text="All Trials" icon="6.png" />
</Col>
<Col span={12} className="btns">
<Search
placeholder="input search Trial No."
onSearch={value => this.searchTrialNo(value)}
style={{ width: 200 }}
id="searchTrial"
/>
<Button
type="primary"
className="tableButton resetBtn"
onClick={this.resetRenderTable}
>
Reset
</Button>
</Col>
</Row>
<TableList
tableSource={tableListSource}
updateList={this.drawTableList}
Expand Down
2 changes: 1 addition & 1 deletion src/webui/src/components/trial-detail/Para.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class Para extends React.Component<{}, ParaState> {
</Select>
<Button
type="primary"
className="changeBtu"
className="changeBtu tableButton"
onClick={this.swapBtn}
>
Confirm
Expand Down
Loading

0 comments on commit 898b469

Please sign in to comment.