mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 01:25:38 -05:00
ML - model source type page (#13077)
* Initial checkin * Style adjustments. * addressed PR comments Co-authored-by: Hale Rankin <harankin@microsoft.com>
This commit is contained in:
@@ -28,9 +28,14 @@ export interface PredictModelEventArgs extends PredictParameters {
|
||||
|
||||
|
||||
export enum ModelSourceType {
|
||||
Local,
|
||||
Azure,
|
||||
RegisteredModels
|
||||
Local = 'Local',
|
||||
Azure = 'Azure',
|
||||
RegisteredModels = 'RegisteredModels'
|
||||
}
|
||||
|
||||
export enum ModelActionType {
|
||||
Import,
|
||||
Predict
|
||||
}
|
||||
|
||||
export interface ModelViewData {
|
||||
@@ -74,6 +79,7 @@ export abstract class ModelViewBase extends ViewBase {
|
||||
private _modelSourceType: ModelSourceType = ModelSourceType.Local;
|
||||
private _modelsViewData: ModelViewData[] = [];
|
||||
private _importTable: DatabaseTable | undefined;
|
||||
private _modelActionType: ModelActionType = ModelActionType.Import;
|
||||
|
||||
constructor(apiWrapper: ApiWrapper, root?: string, parent?: ModelViewBase) {
|
||||
super(apiWrapper, root, parent);
|
||||
@@ -245,6 +251,28 @@ export abstract class ModelViewBase extends ViewBase {
|
||||
return await this.sendDataRequest(ListGroupsEventName, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets model action type
|
||||
*/
|
||||
public set modelActionType(value: ModelActionType) {
|
||||
if (this.parent) {
|
||||
this.parent.modelActionType = value;
|
||||
} else {
|
||||
this._modelActionType = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns model action type
|
||||
*/
|
||||
public get modelActionType(): ModelActionType {
|
||||
if (this.parent) {
|
||||
return this.parent.modelActionType;
|
||||
} else {
|
||||
return this._modelActionType;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets model source type
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user