/// import * as vscode from 'vscode'; import * as fs from 'fs'; export declare enum InputType { binary_hsd = "binary_hsd", image = "image", csv_cartesiam = "csv_cartesiam", csv_unico = "csv_unico", csv_sensortile = "csv_sensortile" } export declare enum ModelType { classifier = "classifier", anomaly_detector = "anomaly_detector", predictor = "predictor" } export declare enum OutputType { openmv_stm32_bin = "openmv_stm32_bin", mlc = "mlc", full_stm32_bin = "full_stm32_bin", partial_stm32_bin = "partial_stm32_bin", openmv_stm32_upython = "openmv_stm32_upython", cartesiam = "cartesiam", octonion = "octonion", full_stred_bin = "full_stred_bin", partial_stred_bin = "partial_stred_bin", mp1_greengrass_lambda = "mp1_greengrass_lambda", mp1_azure_iot_edge = "mp1_azure_iot_edge", mp1_azure_iot_coral_tpu = "mp1_azure_iot_coral_tpu", full_spc5_bin = "full_spc5_bin", partial_spc5_bin = "partial_spc5_bin" } export declare enum Stage { input = "input", model = "model", output = "output" } export declare enum TrainingType { offline = "offline", online = "online" } export declare enum ModelStage { definition = "definition", input = "log_collection", modeling = "modeling", deployed = "deployed", validation = "validation" } export declare class Tool { readonly name: string; readonly version: string; readonly parameters: any; constructor(name: string, version: string, parameters: any); static deserialize(tool: any): Tool; } export declare class Test { readonly uuid: string; readonly name: string; readonly best: boolean; readonly modelFile: string | null; readonly reports: Array; readonly outputs: Array; constructor(uuid: string, name: string, best: boolean, modelFile: string | null, reports: Array, outputs: Array); static deserialize(test: any, best: boolean): Test; } export declare class Experiment { readonly uuid: string; readonly name: string; readonly description: string; readonly modelDevFile: string; readonly tests: Array; constructor(uuid: string, name: string, description: string, modelDevFile: string, tests: Array); static deserialize(experiment: any, tests: Array): Experiment; } export declare class Log { readonly uuid: string; readonly name: string; readonly time: string; constructor(uuid: string, name: string, time: string); static deserialize(log: any): Log; } export declare class Input { readonly type: InputType; readonly augmentation: Array; readonly tools: Array; readonly logs: Array; constructor(type: InputType, augmentation: Array, tools: Array, logs: Array); static deserialize(input: any): Input; } export declare class Output { readonly type: OutputType; readonly tools: Array; constructor(type: OutputType, tools: Array); static deserialize(output: any): Output; } export declare class Model { readonly uuid: string; readonly name: string; readonly stage: ModelStage; readonly type: ModelType; readonly metadata: any; readonly input: Input; readonly output: Output; readonly experiments: Array; constructor(uuid: string, name: string, stage: ModelStage, type: ModelType, metadata: any, input: Input, output: Output, experiments: Array); static deserialize(model: any, input: Input, output: Output, experiments: Array): Model; } export declare class Project { readonly rawProject: any; readonly uuid: string; readonly name: string; readonly description: string; readonly version: string; readonly models: Array; readonly uri: vscode.Uri; constructor(rawProject: any, uuid: string, name: string, description: string, version: string, models: Array, uri: vscode.Uri); static deserialize(p: any, uri: vscode.Uri): Project; serialize(): any; } /** * @abstract @class IProjectManager * * @description Project manager exposes methods to handle an Edge.AI project data model * * @param onDidChangeProject Event fired when concrete project change * @param rawProject Raw project data model * @param project Deserialized project data model * @param uri URI identifying the current project */ export declare abstract class IProjectManager { protected __project: any; set _project(value: any); get _project(): any; protected _parsedProject: Project | undefined; get project(): Project; uri: vscode.Uri; protected _onDidChangeProject: vscode.EventEmitter; onDidChangeProject: vscode.Event; NewProject(uri: vscode.Uri, name: String, description: String): void; Connect(uri: vscode.Uri): Promise; Load(): Promise; Commit(): Promise; Disconnect(): Promise; AddLog(uuid: string | undefined, name: string, description: string, annotated: boolean, startTime: string, endTime: string, deviceDescription: any): Promise; AddModel(name: String, stage: ModelStage, inputType: InputType, modelType: ModelType, outputType: OutputType, trainingType: TrainingType, modelMetadata: any, inputTools: Array, outputTools: Array): Promise; UpdateModel(modelId: string, name: string, stage: ModelStage | undefined, classes: string[] | undefined): void; RemoveModel(modelId: string): void; AddModelAugmentation(modelId: string, name: string): void; RemoveModelAugmentation(modelId: string, name: string): void; AddExperiment(modelId: string, name: String, description: String, modelDevFile: String | null): Experiment; UpdateExperiment(modelId: string, experimentId: string, description: string | undefined, modelDevFile: string | null | undefined): void; RemoveExperiment(modelId: string, experimentId: string): void; AddTest(modelId: string, experimentId: string, name: string, modelFile: string | null): Test; SetBestTest(modelId: string, testId: string): void; UpdateTestReports(modelId: string, testId: string, parameters: any, reports: Array): void; UpdateTestOutputs(modelId: string, testId: string, parameters: any, outputs: Array): void; RemoveTest(modelId: string, experimentId: string, testId: string): void; constructor(); } /** * @interface FsProjectManager * * @description Filesystem project manager class let handling of an Edge.AI project data model stored within local fileystem */ export declare class FsProjectManager extends IProjectManager { readonly baseUri: vscode.Uri; readonly projectSchemaUri: vscode.Uri; private projectFileWatcher; constructor(baseUri: vscode.Uri, projectSchemaUri: vscode.Uri); Connect(uri: vscode.Uri): Promise; Load(): Promise; Commit(): Promise; Disconnect(): Promise; NewProject(uri: vscode.Uri, name: String, description: String): void; AddLog(uuid: string | undefined, name: string, description: string, annotated: boolean, startTime: string, endTime: string, deviceDescription: any): Promise; AddModel(name: String, stage: ModelStage, inputType: InputType, modelType: ModelType, outputType: OutputType, trainingType: TrainingType, modelMetadata: any, inputTools: Array, outputTools: Array): Promise; UpdateModel(modelId: string, name: string, stage: ModelStage | undefined, classes: [] | undefined): void; RemoveModel(modelId: string): void; AddModelAugmentation(modelId: string, name: string): void; RemoveModelAugmentation(modelId: string, name: string): void; AddExperiment(modelId: string, name: String, description: String, modelDevFile: String | null): Experiment; UpdateExperiment(modelId: string, experimentId: string, description: string | undefined, modelDevFile: string | null | undefined): void; RemoveExperiment(modelId: string, experimentId: string): void; AddTest(modelId: string, experimentId: string, name: string, modelFile: string | null): Test; SetBestTest(modelId: string, testId: string): void; RemoveTest(modelId: string, experimentId: string, testId: string): void; UpdateTestReports(modelId: string, testId: string, parameters: any, reports: Array): void; UpdateTestOutputs(modelId: string, testId: string, parameters: any, outputs: Array): void; } /** * @interface HttpProjectManager * * @description HTTP project manager client class let handling of an Edge.AI project data model stored remotly */ export declare class HttpProjectManager extends IProjectManager { backendBaseUrl: vscode.Uri; private _jwtToken; get jwtToken(): string; set jwtToken(value: string); constructor(backendBaseUrl: vscode.Uri); GetProjects(): Promise>; GetProject(projectName: string): Promise; NewProject(uri: vscode.Uri, name: String, description: String): void; Connect(uri: vscode.Uri): Promise; Load(): Promise; Commit(): Promise; Disconnect(): Promise; AddLog(uuid: string | undefined, name: string, description: string, annotated: boolean, startTime: string, endTime: string, deviceDescription: any): Promise; UploadLog(modelName: string, logId: string, zipLog: vscode.Uri): Promise; AddModel(name: String, stage: ModelStage, inputType: InputType, modelType: ModelType, outputType: OutputType, trainingType: TrainingType, modelMetadata: any): Promise; UpdateModel(uuid: string, name: string, stage: ModelStage | undefined, classes: string[] | undefined): Promise; RemoveModel(modelId: string): Promise; AddExperiment(modelId: string, name: String, description: String, modelDevFile: String | null): Experiment; RemoveExperiment(modelId: string, experimentId: string): Promise; AddTest(modelId: string, experimentId: string, name: string, modelFile: string | null): Test; UpdateTest(modelId: string, testId: string, parameters: any, reports: string[]): Promise; RemoveTest(modelId: string, experimentId: string, testId: string): Promise; DownloadTestOutput(modelName: string, experimentName: string, testName: string, outputName: string, outputStream: fs.WriteStream): Promise; }