Machine Learning Services Dashboard (#8796)

* Added a dashboard for Machine Learning Services Extension
This commit is contained in:
Leila Lali
2020-01-08 11:24:58 -08:00
committed by GitHub
parent 774151b6e9
commit 2d2376a2a6
15 changed files with 699 additions and 52 deletions

View File

@@ -5,7 +5,7 @@
'use strict';
import * as uuid from 'uuid';
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
import * as path from 'path';
import * as os from 'os';
import * as fs from 'fs';
@@ -15,7 +15,7 @@ import { promisify } from 'util';
export async function execCommandOnTempFile<T>(content: string, command: (filePath: string) => Promise<T>): Promise<T> {
let tempFilePath: string = '';
try {
tempFilePath = path.join(os.tmpdir(), `ads_ml_temp_${uuid.v4()}`);
tempFilePath = path.join(os.tmpdir(), `ads_ml_temp_${UUID.generateUuid()}`);
await fs.promises.writeFile(tempFilePath, content);
let result = await command(tempFilePath);
return result;
@@ -46,3 +46,7 @@ export function getPythonExePath(rootFolder: string): string {
constants.pythonBundleVersion,
process.platform === constants.winPlatform ? 'python.exe' : 'bin/python3');
}
export function isWindows(): boolean {
return process.platform === 'win32';
}