ML - Bug fixing (#11920)

* Fixed a bug with validating inputs when generating predict script

* Fixed the bug with verifying R packages

* Fixed the tests

* Added warning for when output column data type doesn't match with model output data type

* Fix the issue with selecting db
This commit is contained in:
Leila Lali
2020-08-31 20:02:30 -07:00
committed by GitHub
parent 23bd05ea68
commit 635da9a2b2
6 changed files with 105 additions and 36 deletions

View File

@@ -165,11 +165,13 @@ export class InstalledPackagesTab {
*/
public static async getLocationComponent(view: azdata.ModelView, dialog: ManagePackagesDialog): Promise<azdata.Component> {
const locations = await dialog.model.getLocations();
let location: string;
let component: azdata.Component;
if (locations && locations.length === 1) {
component = view.modelBuilder.text().withProperties({
value: locations[0].displayName
}).component();
location = locations[0].name;
} else if (locations && locations.length > 1) {
let dropdownValues = locations.map(x => {
return {
@@ -179,6 +181,7 @@ export class InstalledPackagesTab {
});
const currentLocation = await dialog.model.getCurrentLocation();
const selectedLocation = dropdownValues.find(x => x.name === currentLocation);
location = currentLocation || locations[0].name;
let locationDropDown = view.modelBuilder.dropDown().withProperties({
values: dropdownValues,
value: selectedLocation || dropdownValues[0]
@@ -198,8 +201,8 @@ export class InstalledPackagesTab {
component = view.modelBuilder.text().withProperties({
}).component();
}
if (locations && locations.length > 0) {
dialog.changeLocation(locations[0].name);
if (location) {
dialog.changeLocation(location);
}
return component;
}