Skip to content

Commit a8206db

Browse files
authored
Merge pull request #143 from Microsoft/user/xianz/winmldb
update readme and document link
2 parents 4b13d9a + 3dca318 commit a8206db

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

Tools/WinMLDashboard/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,21 @@ The **Convert** tab (see snip below) helps convert models from several different
3232

3333
In order to do the conversion, the tool installs a separate Python environment and a set of converter tools. This helps alleviate one of the big pain points of a typical developer - installing the right Python environment and tool chain for conversion and validating the model.
3434

35-
WinMLTools provides quantization feature to reduce the memory footprint of the model.
35+
WinMLTools provides [quantization](https://docs.microsoft.com/en-us/windows/ai/convert-model-winmltools#quantize-onnx-model) feature to reduce the memory footprint of the model.
3636

37-
For **quantization**:
38-
|Type |Usage |
39-
|-----|--------|
40-
|**Type1**|Do not use dequantize_linear option, the converted model can only be run in Win10 released before [Version 1809 (OS build 17763)](https://support.microsoft.com/en-us/help/4464619/windows-10-update-history)|
41-
|**Type2**|Use dequantize_linear option, the converted model can also be run in Win10 release after Version 1809 (OS build 17763)|
37+
For **quantization:**
38+
39+
|Type |Usage |
40+
|------------|-------|
41+
|**Type1** |Do not use dequantize_linear option, the converted model can only be run in Win10 released before [Version 1809 (OS build 17763)](https://support.microsoft.com/en-us/help/4464619/windows-10-update-history) |
42+
|**Type2** |Use dequantize_linear option, the converted model can also be run in Win10 release after Version 1809 (OS build 17763) |
43+
44+
For **ONNX Version:**
45+
46+
|Version |For Windows 10 Build|
47+
|------------|--------------------|
48+
|1.2 |[1809 (OS build 17763)](https://support.microsoft.com/en-us/help/4464619/windows-10-update-history)|
49+
|1.3 |after 1809 (OS build 17763)|
4250

4351
<img src="./public/Converter.png" width=800/>
4452

Tools/WinMLDashboard/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resultPromise = electronInstaller.createWindowsInstaller({
55
appDirectory: path.join('./release/WinMLDashboard-win32-x64'),
66
authors: 'Microsoft Corporation',
77
exe: 'WinMLDashboard.exe',
8-
iconUrl: 'https://github.com/Microsoft/Windows-Machine-Learning/blob/RS5/Tools/WinMLDashboard/public/winml_icon.ico',
8+
iconUrl: 'https://github.com/Microsoft/Windows-Machine-Learning/blob/master/Tools/WinMLDashboard/public/winml_icon.ico',
99
loadingGif: './public/progress_bar.gif',
1010
noMsi: true,
1111
outputDirectory: path.join('./installer'),

Tools/WinMLDashboard/src/native/menu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function createMenu(electron: typeof Electron) {
2222
{
2323
label: 'Documentation',
2424
click() {
25-
const tpnUrl = 'https://github.com/Microsoft/Windows-Machine-Learning/blob/RS5/Tools/WinMLDashboard/README.md';
25+
const tpnUrl = 'https://github.com/Microsoft/Windows-Machine-Learning/blob/master/Tools/WinMLDashboard/README.md';
2626
require('electron').shell.openExternal(tpnUrl);
2727
},
2828
},
@@ -39,7 +39,7 @@ export function createMenu(electron: typeof Electron) {
3939
{
4040
label: 'Third Party Notice',
4141
click() {
42-
const tpnUrl = 'https://github.com/Microsoft/Windows-Machine-Learning/blob/RS5/Tools/WinMLDashboard/ThirdPartyNotice.txt';
42+
const tpnUrl = 'https://github.com/Microsoft/Windows-Machine-Learning/blob/master/Tools/WinMLDashboard/ThirdPartyNotice.txt';
4343
require('electron').shell.openExternal(tpnUrl);
4444
},
4545
},

Tools/WinMLDashboard/src/view/convert/View.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fs from 'fs';
2+
import * as path from 'path';
23
import * as React from 'react';
34
import { connect } from 'react-redux';
45

@@ -9,6 +10,8 @@ import { Spinner } from 'office-ui-fabric-react/lib/Spinner';
910
import { TextField } from 'office-ui-fabric-react/lib/TextField';
1011
import Select from 'react-select';
1112

13+
import { winmlDataFolder } from '../../native/appData';
14+
1215
import Collapsible from '../../components/Collapsible';
1316
import { setFile, setQuantizationOption, setSaveFileName } from '../../datastore/actionCreators';
1417
import IState from '../../datastore/state';
@@ -125,7 +128,7 @@ class ConvertView extends React.Component<IComponentProperties, IComponentState>
125128
return <Spinner label="Converting..." />;
126129
}
127130
this.localPython = this.localPython || getLocalPython();
128-
if (!this.localPython) {
131+
if (!this.localPython || !fs.existsSync(path.join(winmlDataFolder, '/python/PIResult.txt'))) {
129132
return this.pythonChooser();
130133
}
131134
return this.converterView();
@@ -184,6 +187,10 @@ class ConvertView extends React.Component<IComponentProperties, IComponentState>
184187
await pip(['install', '-r', packagedFile('requirements.txt'), '--no-warn-script-location'], this.outputListener);
185188
this.setState({ currentStep: Step.Idle });
186189
log.info("python environment is installed successfully");
190+
fs.writeFile(path.join(winmlDataFolder, '/python/PIResult.txt'), 'Python is installed successfully!', (err) => {
191+
if (err) { throw err; }
192+
log.info('PIResult.txt Saved!');
193+
});
187194
pythonDialogOptions.message = 'python environment is installed successfully!'
188195
require('electron').remote.dialog.showMessageBox(require('electron').remote.getCurrentWindow(), pythonDialogOptions)
189196
} catch (error) {
@@ -362,7 +369,7 @@ class ConvertView extends React.Component<IComponentProperties, IComponentState>
362369
}
363370
// Convert successfully
364371
log.info(this.state.source + " is converted successfully.");
365-
convertDialogOptions.message = 'convert successfully!'
372+
convertDialogOptions.message = 'Converted successfully!'
366373
require('electron').remote.dialog.showMessageBox(require('electron').remote.getCurrentWindow(), convertDialogOptions)
367374
this.setState({ currentStep: Step.Idle, source: undefined, console:"Converted successfully!!"});
368375

0 commit comments

Comments
 (0)