Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Add WebUI mock server and improve hyper-parameter parallel coordinates chart #2691

Merged
merged 15 commits into from
Jul 24, 2020

Conversation

ultmaster
Copy link
Contributor

No description provided.

@ultmaster ultmaster marked this pull request as draft July 15, 2020 14:44
@ultmaster ultmaster marked this pull request as ready for review July 22, 2020 03:31
@ultmaster ultmaster requested review from liuzhe-lz and colorjam July 22, 2020 03:32
@@ -48,7 +48,8 @@ Nothing to do, the code is already linked to package folders.
#### TypeScript

* If `src/nni_manager` is changed, run `yarn watch` under this folder. It will watch and build code continually. The `nnictl` need to be restarted to reload NNI manager.
* If `src/webui` or `src/nasui` are changed, run `yarn start` under the corresponding folder. The web UI will refresh automatically if code is changed.
* If `src/webui` is changed, run `yarn dev`, which will run a mock API server and a webpack dev server simultaneously. Use `EXPERIMENT` environment variable (e.g., `mnist-tfv1-running`) to change mock data. Built-in mock experiments are listed in `src/webui/mock`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to provide the entire command such as EXPERIMENT=mnist-tfv1-running yarn dev

@@ -0,0 +1,6 @@
.parcoords {
text.label, text {
font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

twice "Segoe UI"

if (this.acc === undefined) {
return ret;
}
const acc = typeof this.acc === 'number' ? { default: this.acc } : this.acc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accDictionary in source is === your acc

if (trial.acc === undefined)
continue;
// TODO: handle more than number and object
const acc = typeof trial.acc === 'number' ? { default: trial.acc } : trial.acc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use this field accDictionary in data source

src/webui/src/static/model/searchspace.ts Outdated Show resolved Hide resolved

export class MetricSpace implements MultipleAxes {
axes = new Map<string, SingleAxis>();
name = '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also name question

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to baseName

nested = false;

constructor(name: string, fullName: string, type: string, value: any) {
this.name = name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think name is a sensitive name.

Comment on lines 101 to 102
if (searchSpaceSpec === undefined)
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{}

const key = item[0], spec = item[1] as any;
if (key === '_name') {
return;
} else if (spec._type === 'choice' || spec._type === 'layer_choice' || spec._type === 'input_choice') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

['x', 'xx', 'xx'].includes(spec._type)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion!

this.max = value[1];
} else if (type.indexOf('normal') !== -1) {
const [mu, sigma] = [value[0], value[1]];
this.min = mu - 4 * sigma;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why x 4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In normal distribution, [mu - 4sigma, mu + 4sigma] is a very safe domain of the values.

fullName: string;

constructor(name: string, fullName: string, searchSpaceSpec: any) {
this.name = name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also name question

@ultmaster ultmaster merged commit 754b004 into microsoft:master Jul 24, 2020
@scarlett2018 scarlett2018 mentioned this pull request Jul 24, 2020
66 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants