Archived
ML- Fixed the issue with wrong title in predict page (#10467)
* Fixed the issue with wrong title in predict page * Fixed the type of ml settings * Increased timeout * Fixed the bug with R package management and Windows auth * fixed the tests * fixed a typo
This commit is contained in:
@@ -14,8 +14,8 @@ export const pythonLanguageName = 'Python';
|
||||
export const rLanguageName = 'R';
|
||||
export const rLPackagedFolderName = 'r_packages';
|
||||
|
||||
export const mlEnableMlsCommand = 'mls.command.enableMls';
|
||||
export const mlDisableMlsCommand = 'mls.command.disableMls';
|
||||
export const mlEnableMlsCommand = 'ml.command.enableMls';
|
||||
export const mlDisableMlsCommand = 'ml.command.disableMls';
|
||||
export const extensionOutputChannel = 'Machine Learning';
|
||||
export const notebookExtensionName = 'Microsoft.notebook';
|
||||
export const azureSubscriptionsCommand = 'azure.accounts.getSubscriptions';
|
||||
@@ -24,13 +24,13 @@ export const signInToAzureCommand = 'azure.resource.signin';
|
||||
|
||||
// Tasks, commands
|
||||
//
|
||||
export const mlManageLanguagesCommand = 'mls.command.manageLanguages';
|
||||
export const mlsPredictModelCommand = 'mls.command.predictModel';
|
||||
export const mlManageModelsCommand = 'mls.command.manageModels';
|
||||
export const mlImportModelCommand = 'mls.command.importModel';
|
||||
export const mlManagePackagesCommand = 'mls.command.managePackages';
|
||||
export const mlsDependenciesCommand = 'mls.command.dependencies';
|
||||
export const mlsEnableExternalScriptCommand = 'mls.command.enableExternalScript';
|
||||
export const mlManageLanguagesCommand = 'ml.command.manageLanguages';
|
||||
export const mlsPredictModelCommand = 'ml.command.predictModel';
|
||||
export const mlManageModelsCommand = 'ml.command.manageModels';
|
||||
export const mlImportModelCommand = 'ml.command.importModel';
|
||||
export const mlManagePackagesCommand = 'ml.command.managePackages';
|
||||
export const mlsDependenciesCommand = 'ml.command.dependencies';
|
||||
export const mlsEnableExternalScriptCommand = 'ml.command.enableExternalScript';
|
||||
export const notebookCommandNew = 'notebook.command.new';
|
||||
|
||||
// Configurations
|
||||
@@ -104,6 +104,7 @@ export const extLangInstallTabTitle = localize('extLang.installTabTitle', "Insta
|
||||
export const extLangLanguageCreatedDate = localize('extLang.languageCreatedDate', "Installed");
|
||||
export const extLangLanguagePlatform = localize('extLang.languagePlatform', "Platform");
|
||||
export const deleteTitle = localize('extLang.delete', "Delete");
|
||||
export const editTitle = localize('editTitle', "Edit");
|
||||
export const extLangInstallButtonText = localize('extLang.installButtonText', "Install");
|
||||
export const extLangCancelButtonText = localize('extLang.CancelButtonText', "Cancel");
|
||||
export const extLangDoneButtonText = localize('extLang.DoneButtonText', "Close");
|
||||
@@ -129,7 +130,7 @@ export const modelsListEmptyMessage = localize('models.modelsListEmptyMessage',
|
||||
export const modelsListEmptyDescription = localize('models.modelsListEmptyDescription', "Use import wizard to add models to this table");
|
||||
export const databaseName = localize('databaseName', "Models database");
|
||||
export const databaseToStoreInfo = localize('databaseToStoreInfo', "Select a database to store the new model.");
|
||||
export const tableToStoreInfo = localize('tableToStoreInfo', "Select an existing table that conforms the model schema or create a new one to store the new model.");
|
||||
export const tableToStoreInfo = localize('tableToStoreInfo', "Select an existing table that conforms the model schema or create a new one to store the imported model.");
|
||||
export const tableName = localize('tableName', "Models table");
|
||||
export const modelTableInfo = localize('modelTableInfo', "Select a model table to view the list of existing / imported models.");
|
||||
export const modelDatabaseInfo = localize('modelDatabaseInfo', "Select a database where existing / imported models are stored.");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as childProcess from 'child_process';
|
||||
|
||||
const ExecScriptsTimeoutInSeconds = 600000;
|
||||
const ExecScriptsTimeoutInSeconds = 1800000;
|
||||
export class ProcessService {
|
||||
|
||||
public timeout = ExecScriptsTimeoutInSeconds;
|
||||
|
||||
@@ -69,7 +69,8 @@ export class SqlRPackageManageProvider extends SqlPackageManageProviderBase impl
|
||||
|
||||
if (connection) {
|
||||
let database = databaseName ? `, database="${databaseName}"` : '';
|
||||
let connectionParts = `server="${connection.serverName}", uid="${connection.userName}", pwd="${credentials[azdata.ConnectionOptionSpecialType.password]}"${database}`;
|
||||
const auth = connection.userName ? `, uid="${connection.userName}", pwd="${credentials[azdata.ConnectionOptionSpecialType.password]}"` : '';
|
||||
let connectionParts = `server="${connection.serverName}"${auth}${database}`;
|
||||
let rCommandScript = scriptMode === ScriptMode.Install ? 'sql_install.packages' : 'sql_remove.packages';
|
||||
|
||||
let scripts: string[] = [
|
||||
|
||||
+7
-2
@@ -100,7 +100,8 @@ describe('SQL R Package Manager', () => {
|
||||
let connection = new azdata.connection.ConnectionProfile();
|
||||
connection.serverName = 'serverName';
|
||||
connection.databaseName = 'databaseName';
|
||||
let credentials = { [azdata.ConnectionOptionSpecialType.password]: 'password' };
|
||||
connection.userName = 'user';
|
||||
let credentials = { [azdata.ConnectionOptionSpecialType.password]: 'password', [azdata.ConnectionOptionSpecialType.userName]: 'user' };
|
||||
testContext.apiWrapper.setup(x => x.getCurrentConnection()).returns(() => { return Promise.resolve(connection); });
|
||||
testContext.apiWrapper.setup(x => x.getCredentials(TypeMoq.It.isAny())).returns(() => { return Promise.resolve(credentials); });
|
||||
testContext.processService.setup(x => x.execScripts(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns((path, scripts: string[]) => {
|
||||
@@ -139,7 +140,11 @@ describe('SQL R Package Manager', () => {
|
||||
let connection = new azdata.connection.ConnectionProfile();
|
||||
connection.serverName = 'serverName';
|
||||
connection.databaseName = 'databaseName';
|
||||
let credentials = { [azdata.ConnectionOptionSpecialType.password]: 'password' };
|
||||
connection.userName = 'user';
|
||||
let credentials = {
|
||||
[azdata.ConnectionOptionSpecialType.password]: 'password',
|
||||
[azdata.ConnectionOptionSpecialType.userName]: 'user'
|
||||
};
|
||||
testContext.apiWrapper.setup(x => x.getCurrentConnection()).returns(() => { return Promise.resolve(connection); });
|
||||
testContext.apiWrapper.setup(x => x.getCredentials(TypeMoq.It.isAny())).returns(() => { return Promise.resolve(credentials); });
|
||||
testContext.processService.setup(x => x.execScripts(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns((path, scripts: string[]) => {
|
||||
|
||||
@@ -138,7 +138,7 @@ export class LanguagesTable extends LanguageViewBase {
|
||||
|
||||
let editLanguageButton = this._modelBuilder.button().withProperties({
|
||||
label: '',
|
||||
title: constants.deleteTitle,
|
||||
title: constants.editTitle,
|
||||
iconPath: {
|
||||
dark: this.asAbsolutePath('images/dark/edit_inverse.svg'),
|
||||
light: this.asAbsolutePath('images/light/edit.svg')
|
||||
|
||||
@@ -287,7 +287,7 @@ export class CurrentModelsTable extends ModelViewBase implements IDataComponent<
|
||||
|
||||
editButton = this._modelBuilder.button().withProperties({
|
||||
label: '',
|
||||
title: constants.deleteTitle,
|
||||
title: constants.editTitle,
|
||||
iconPath: {
|
||||
dark: this.asAbsolutePath('images/dark/edit_inverse.svg'),
|
||||
light: this.asAbsolutePath('images/light/edit.svg')
|
||||
|
||||
@@ -40,6 +40,7 @@ export class PredictWizard extends ModelViewBase {
|
||||
* Opens a dialog to manage packages used by notebooks.
|
||||
*/
|
||||
public async open(): Promise<void> {
|
||||
this.modelSourceType = ModelSourceType.RegisteredModels;
|
||||
this.modelSourcePage = new ModelSourcePage(this._apiWrapper, this, [ModelSourceType.RegisteredModels, ModelSourceType.Local, ModelSourceType.Azure]);
|
||||
this.columnsSelectionPage = new ColumnsSelectionPage(this._apiWrapper, this);
|
||||
this.modelBrowsePage = new ModelBrowsePage(this._apiWrapper, this, false);
|
||||
|
||||
Reference in New Issue
Block a user