@microsoft/bf-orchestrator
Advanced tools
Comparing version 4.11.0-beta.20201203.9b18c73 to 4.11.0-beta.20201203.cd29e25
@@ -7,3 +7,3 @@ export declare class OrchestratorEvaluate { | ||
static readonly snapshotSetLabelsOutputFilename: string; | ||
static runAsync(inputPath: string, outputPath: string, baseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static runAsync(inputPath: string, outputPath: string, baseModelPath?: string, entityBaseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
} |
@@ -17,3 +17,3 @@ "use strict"; | ||
// eslint-disable-next-line max-params | ||
static async runAsync(inputPath, outputPath, baseModelPath = '', ambiguousClosenessThresholdParameter = utility_1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = utility_1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = utility_1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = utility_1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
static async runAsync(inputPath, outputPath, baseModelPath = '', entityBaseModelPath = '', ambiguousClosenessThresholdParameter = utility_1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = utility_1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = utility_1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = utility_1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
// ----------------------------------------------------------------------- | ||
@@ -33,2 +33,8 @@ // ---- NOTE ---- process arguments | ||
} | ||
if (entityBaseModelPath) { | ||
entityBaseModelPath = path.resolve(entityBaseModelPath); | ||
} | ||
else { | ||
entityBaseModelPath = ''; | ||
} | ||
const ambiguousClosenessThreshold = ambiguousClosenessThresholdParameter; | ||
@@ -41,2 +47,3 @@ const lowConfidenceScoreThreshold = lowConfidenceScoreThresholdParameter; | ||
utility_1.Utility.debuggingLog(`baseModelPath=${baseModelPath}`); | ||
utility_1.Utility.debuggingLog(`entityBaseModelPath=${entityBaseModelPath}`); | ||
utility_1.Utility.debuggingLog(`ambiguousClosenessThreshold=${ambiguousClosenessThreshold}`); | ||
@@ -63,3 +70,3 @@ utility_1.Utility.debuggingLog(`lowConfidenceScoreThreshold=${lowConfidenceScoreThreshold}`); | ||
utility_1.Utility.debuggingLog('OrchestratorEvaluate.runAsync(), ready to call LabelResolver.createAsync()'); | ||
await labelresolver_1.LabelResolver.createAsync(baseModelPath); | ||
await labelresolver_1.LabelResolver.createAsync(baseModelPath, entityBaseModelPath); | ||
utility_1.Utility.debuggingLog('OrchestratorEvaluate.runAsync(), after calling LabelResolver.createAsync()'); | ||
@@ -66,0 +73,0 @@ utility_1.Utility.debuggingLog('OrchestratorEvaluate.runAsync(), ready to call UtilityLabelResolver.resetLabelResolverSettingUseCompactEmbeddings()'); |
@@ -128,2 +128,3 @@ "use strict"; | ||
} | ||
// eslint-disable-next-line complexity | ||
static addExamples(utteranceIntentEntityLabels, labelResolver = null) { | ||
@@ -148,5 +149,5 @@ utility_1.Utility.debuggingLog('CALLING LabelResolver.addExamples()'); | ||
const labels = utteranceLabelsMap.get(utterance); | ||
// if (Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Intent: Added { labels.size: ${labels.size}, text: ${utterance} }`); | ||
// } | ||
if (utility_1.Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Intent: Added { labels.size: ${labels.size}, text: ${utterance} }`); | ||
} | ||
if (labels && (labels.size > 0)) { | ||
@@ -159,5 +160,5 @@ for (const label of labels) { | ||
// eslint-disable-next-line max-depth | ||
// if (Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Intent: Added { label: ${label}, text: ${utterance} }`); | ||
// } | ||
if (utility_1.Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Intent: Added { label: ${label}, text: ${utterance} }`); | ||
} | ||
} | ||
@@ -186,5 +187,5 @@ else { | ||
const labels = utteranceEntityLabelsMap.get(utterance); | ||
// if (Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Entity: Added { labels.length: ${labels.length}, text: ${utterance} }`); | ||
// } | ||
if (utility_1.Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Entity: Added { labels.length: ${labels.length}, text: ${utterance} }`); | ||
} | ||
if (labels && (labels.length > 0)) { | ||
@@ -210,5 +211,5 @@ for (const label of labels) { | ||
// eslint-disable-next-line max-depth | ||
// if (Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Entity: Added { label: ${label}, text: ${utterance}, offset: ${spanOffset}, length: ${spanLength} }`); | ||
// } | ||
if (utility_1.Utility.toPrintDetailedDebuggingLogToConsole) { | ||
utility_1.Utility.debuggingLog(`LabelResolver.addExample()-Entity: Added { label: ${label}, text: ${utterance}, offset: ${spanOffset}, length: ${spanLength} }`); | ||
} | ||
} | ||
@@ -215,0 +216,0 @@ else { |
export declare class Orchestrator { | ||
static createAsync(baseModelPath: string, entityBaseModelPath: string, inputPathConfiguration: string, outputPath: string, hierarchical?: boolean, fullEmbedding?: boolean): Promise<void>; | ||
static buildAsync(baseModelPath: string, entityBaseModelPath: string, inputs: any[], isDialog: boolean, luConfig?: any, fullEmbedding?: boolean): Promise<any>; | ||
static evaluateAsync(inputPath: string, outputPath: string, baseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static baseModelGetAsync(baseModelPath: string, basemodelId: string, onProgress?: any, onFinish?: any): Promise<void>; | ||
static baseModelListAsync(): Promise<string>; | ||
static baseModelGetVersionsAsync(): Promise<any>; | ||
static predictAsync(baseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static testAsync(baseModelPath: string, inputPathConfiguration: string, testPathConfiguration: string, outputPath: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static queryAsync(baseModelPath: string, entityBaseModelPath: string, inputPathConfiguration: string, queryConfiguration: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean): Promise<void>; | ||
static buildAsync(baseModelPath: string, inputs: any[], isDialog: boolean, entityBaseModelPath?: string, luConfig?: any, fullEmbedding?: boolean): Promise<any>; | ||
static createAsync(baseModelPath: string, inputPathConfiguration: string, outputPath: string, entityBaseModelPath?: string, hierarchical?: boolean, fullEmbedding?: boolean): Promise<void>; | ||
static evaluateAsync(inputPath: string, outputPath: string, baseModelPath?: string, entityBaseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static predictAsync(baseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, entityBaseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static testAsync(baseModelPath: string, inputPathConfiguration: string, testPathConfiguration: string, outputPath: string, entityBaseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static queryAsync(baseModelPath: string, inputPathConfiguration: string, queryConfiguration: string, entityBaseModelPath?: string, ambiguousClosenessThresholdParameter?: number, lowConfidenceScoreThresholdParameter?: number, multiLabelPredictionThresholdParameter?: number, unknownLabelPredictionThresholdParameter?: number, fullEmbedding?: boolean): Promise<void>; | ||
static assessAsync(inputPathConfiguration: string, predictionPathConfiguration: string, outputPath: string, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
} |
@@ -18,14 +18,23 @@ "use strict"; | ||
class Orchestrator { | ||
// eslint-disable-next-line max-params | ||
static async createAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, outputPath, hierarchical = false, fullEmbedding = false) { | ||
await create_1.OrchestratorCreate.runAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, outputPath, hierarchical, fullEmbedding); | ||
static async baseModelGetAsync(baseModelPath, basemodelId, onProgress = basemodel_1.OrchestratorBaseModel.defaultHandler, onFinish = basemodel_1.OrchestratorBaseModel.defaultHandler) { | ||
await basemodel_1.OrchestratorBaseModel.getAsync(baseModelPath, basemodelId, onProgress, onFinish); | ||
} | ||
static async baseModelListAsync() { | ||
return basemodel_1.OrchestratorBaseModel.listAsync(); | ||
} | ||
static async baseModelGetVersionsAsync() { | ||
return basemodel_1.OrchestratorBaseModel.getVersionsAsync(); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async buildAsync(baseModelPath, entityBaseModelPath, inputs, isDialog, luConfig = null, fullEmbedding = false) { | ||
static async buildAsync(baseModelPath, inputs, isDialog, entityBaseModelPath = '', luConfig = null, fullEmbedding = false) { | ||
return build_1.OrchestratorBuild.runAsync(baseModelPath, entityBaseModelPath, inputs, isDialog, luConfig, fullEmbedding); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async evaluateAsync(inputPath, outputPath, baseModelPath = '', ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await evaluate_1.OrchestratorEvaluate.runAsync(inputPath, outputPath, baseModelPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
static async createAsync(baseModelPath, inputPathConfiguration, outputPath, entityBaseModelPath = '', hierarchical = false, fullEmbedding = false) { | ||
await create_1.OrchestratorCreate.runAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, outputPath, hierarchical, fullEmbedding); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async evaluateAsync(inputPath, outputPath, baseModelPath = '', entityBaseModelPath = '', ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await evaluate_1.OrchestratorEvaluate.runAsync(inputPath, outputPath, baseModelPath, entityBaseModelPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
} | ||
/* | ||
@@ -36,21 +45,12 @@ public static async fineTuneAsync(baseModelPath: string, inputPath: string, outputPath: string): Promise<void> { | ||
*/ | ||
static async baseModelGetAsync(baseModelPath, basemodelId, onProgress = basemodel_1.OrchestratorBaseModel.defaultHandler, onFinish = basemodel_1.OrchestratorBaseModel.defaultHandler) { | ||
await basemodel_1.OrchestratorBaseModel.getAsync(baseModelPath, basemodelId, onProgress, onFinish); | ||
} | ||
static async baseModelListAsync() { | ||
return basemodel_1.OrchestratorBaseModel.listAsync(); | ||
} | ||
static async baseModelGetVersionsAsync() { | ||
return basemodel_1.OrchestratorBaseModel.getVersionsAsync(); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async predictAsync(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await predict_1.OrchestratorPredict.runAsync(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
static async predictAsync(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, entityBaseModelPath = '', ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await predict_1.OrchestratorPredict.runAsync(baseModelPath, entityBaseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async testAsync(baseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await test_1.OrchestratorTest.runAsync(baseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
static async testAsync(baseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, entityBaseModelPath = '', ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false, obfuscateEvaluationReport = false) { | ||
await test_1.OrchestratorTest.runAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbedding, obfuscateEvaluationReport); | ||
} | ||
// eslint-disable-next-line max-params | ||
static async queryAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, queryConfiguration, ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false) { | ||
static async queryAsync(baseModelPath, inputPathConfiguration, queryConfiguration, entityBaseModelPath = '', ambiguousClosenessThresholdParameter = _1.Utility.DefaultAmbiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter = _1.Utility.DefaultLowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter = _1.Utility.DefaultMultiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter = _1.Utility.DefaultUnknownLabelPredictionThresholdParameter, fullEmbedding = false) { | ||
await query_1.OrchestratorQuery.runAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, queryConfiguration, | ||
@@ -57,0 +57,0 @@ // outputPath, |
@@ -114,4 +114,5 @@ "use strict"; | ||
const utteranceLabelDuplicateMap = new Map(); | ||
const utteranceEntityLabelsMap = new Map(); | ||
const utteranceEntityLabelDuplicateMap = new Map(); | ||
// ==== NOTE-DISABLE-ENTITY-EXAMPLE ==== when it's done, change let back to const. | ||
let utteranceEntityLabelsMap = new Map(); | ||
let utteranceEntityLabelDuplicateMap = new Map(); | ||
const filePaths = filePathConfiguration.split(','); | ||
@@ -127,3 +128,14 @@ for (const filePathEntry of filePaths) { | ||
utility_1.Utility.processUnknownLabelsInUtteranceLabelsMap({ utteranceLabelsMap, utteranceLabelDuplicateMap }); | ||
return { utteranceLabelsMap, utteranceLabelDuplicateMap, utteranceEntityLabelsMap, utteranceEntityLabelDuplicateMap }; | ||
utteranceEntityLabelsMap = new Map(); | ||
utteranceEntityLabelDuplicateMap = new Map(); | ||
return { utteranceLabelsMap, | ||
utteranceLabelDuplicateMap, | ||
utteranceEntityLabelsMap, | ||
utteranceEntityLabelDuplicateMap }; | ||
/* ==== NOTE-DISABLE-ENTITY-EXAMPLE ==== | ||
return {utteranceLabelsMap, | ||
utteranceLabelDuplicateMap, | ||
utteranceEntityLabelsMap, | ||
utteranceEntityLabelDuplicateMap}; | ||
*/ | ||
} | ||
@@ -130,0 +142,0 @@ /* |
@@ -22,2 +22,3 @@ import { IConfusionMatrix } from '@microsoft/bf-dispatcher'; | ||
protected baseModelPath: string; | ||
protected entityBaseModelPath: string; | ||
protected cliCmmandId: string; | ||
@@ -102,3 +103,3 @@ protected trackEventFunction: any; | ||
}; | ||
constructor(baseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean); | ||
constructor(baseModelPath: string, entityBaseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean); | ||
getPredictingSetGroundTruthJsonContentOutputFilename(): string; | ||
@@ -111,3 +112,3 @@ getPredictingSetPredictionJsonContentOutputFilename(): string; | ||
buildLabelResolver(): Promise<void>; | ||
static runAsync(baseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<number>; | ||
static runAsync(baseModelPath: string, entityBaseModelPath: string, inputPath: string, outputPath: string, cliCmmandId: string, trackEventFunction: any, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<number>; | ||
commandLetLoop(): Promise<number>; | ||
@@ -114,0 +115,0 @@ commandLetH(): number; |
@@ -23,6 +23,7 @@ "use strict"; | ||
/* eslint-disable complexity */ | ||
constructor(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
constructor(baseModelPath, entityBaseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
this.inputPath = ''; | ||
this.outputPath = ''; | ||
this.baseModelPath = ''; | ||
this.entityBaseModelPath = ''; | ||
this.cliCmmandId = ''; | ||
@@ -63,2 +64,5 @@ this.ambiguousClosenessThreshold = utility_1.Utility.DefaultAmbiguousClosenessThresholdParameter; | ||
// } | ||
// if (Utility.isEmptyString(entityBaseModelPath)) { | ||
// Utility.debuggingThrow('The entityBaseModelPath argument is empty'); | ||
// } | ||
if (inputPath) { | ||
@@ -79,5 +83,15 @@ inputPath = path.resolve(inputPath); | ||
} | ||
if (entityBaseModelPath) { | ||
entityBaseModelPath = path.resolve(entityBaseModelPath); | ||
if (!utility_1.Utility.exists(entityBaseModelPath)) { | ||
utility_1.Utility.debuggingThrow(`The input entity model file path "${entityBaseModelPath}" does not exist!`); | ||
} | ||
} | ||
else { | ||
entityBaseModelPath = ''; | ||
} | ||
utility_1.Utility.debuggingLog(`inputPath=${inputPath}`); | ||
utility_1.Utility.debuggingLog(`outputPath=${outputPath}`); | ||
utility_1.Utility.debuggingLog(`baseModelPath=${baseModelPath}`); | ||
utility_1.Utility.debuggingLog(`entityBaseModelPath=${entityBaseModelPath}`); | ||
utility_1.Utility.debuggingLog(`ambiguousClosenessThresholdParameter=${ambiguousClosenessThresholdParameter}`); | ||
@@ -92,2 +106,3 @@ utility_1.Utility.debuggingLog(`lowConfidenceScoreThresholdParameter=${lowConfidenceScoreThresholdParameter}`); | ||
this.baseModelPath = baseModelPath; | ||
this.entityBaseModelPath = entityBaseModelPath; | ||
this.cliCmmandId = cliCmmandId; | ||
@@ -139,3 +154,3 @@ this.trackEventFunction = trackEventFunction; | ||
utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), ready to call LabelResolver.createAsync()'); | ||
await labelresolver_1.LabelResolver.createAsync(this.baseModelPath); | ||
await labelresolver_1.LabelResolver.createAsync(this.baseModelPath, this.entityBaseModelPath); | ||
utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), after calling LabelResolver.createAsync()'); | ||
@@ -156,3 +171,3 @@ utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), ready to call UtilityLabelResolver.resetLabelResolverSettingUseCompactEmbeddings()'); | ||
utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), ready to call LabelResolver.createAsync()'); | ||
await labelresolver_1.LabelResolver.createAsync(this.baseModelPath); | ||
await labelresolver_1.LabelResolver.createAsync(this.baseModelPath, this.entityBaseModelPath); | ||
utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), after calling LabelResolver.createAsync()'); | ||
@@ -165,4 +180,4 @@ utility_1.Utility.debuggingLog('OrchestratorPredict.buildLabelResolver(), ready to call UtilityLabelResolver.resetLabelResolverSettingUseCompactEmbeddings()'); | ||
} | ||
static async runAsync(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
const orchestratorPredict = new OrchestratorPredict(baseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings, obfuscateEvaluationReport); | ||
static async runAsync(baseModelPath, entityBaseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
const orchestratorPredict = new OrchestratorPredict(baseModelPath, entityBaseModelPath, inputPath, outputPath, cliCmmandId, trackEventFunction, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings, obfuscateEvaluationReport); | ||
// ---- NOTE ---- create a LabelResolver object. | ||
@@ -169,0 +184,0 @@ await orchestratorPredict.buildLabelResolver(); |
@@ -7,3 +7,3 @@ export declare class OrchestratorTest { | ||
static readonly testingSetLabelsOutputFilename: string; | ||
static runAsync(baseModelPath: string, inputPathConfiguration: string, testPathConfiguration: string, outputPath: string, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
static runAsync(baseModelPath: string, entityBaseModelPath: string, inputPathConfiguration: string, testPathConfiguration: string, outputPath: string, ambiguousClosenessThresholdParameter: number, lowConfidenceScoreThresholdParameter: number, multiLabelPredictionThresholdParameter: number, unknownLabelPredictionThresholdParameter: number, fullEmbeddings?: boolean, obfuscateEvaluationReport?: boolean): Promise<void>; | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
// eslint-disable-next-line max-params | ||
static async runAsync(baseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
static async runAsync(baseModelPath, entityBaseModelPath, inputPathConfiguration, testPathConfiguration, outputPath, ambiguousClosenessThresholdParameter, lowConfidenceScoreThresholdParameter, multiLabelPredictionThresholdParameter, unknownLabelPredictionThresholdParameter, fullEmbeddings = false, obfuscateEvaluationReport = false) { | ||
// ----------------------------------------------------------------------- | ||
@@ -34,3 +34,17 @@ // ---- NOTE ---- process arguments | ||
} | ||
baseModelPath = path.resolve(baseModelPath); | ||
// if (Utility.isEmptyString(entityBaseModelPath)) { | ||
// Utility.debuggingThrow(`The entityBaseModelPath argument is empty, CWD=${process.cwd()}, called from OrchestratorTest.runAsync()`); | ||
// } | ||
if (baseModelPath) { | ||
baseModelPath = path.resolve(baseModelPath); | ||
} | ||
else { | ||
baseModelPath = ''; | ||
} | ||
if (entityBaseModelPath) { | ||
entityBaseModelPath = path.resolve(entityBaseModelPath); | ||
} | ||
else { | ||
entityBaseModelPath = ''; | ||
} | ||
const ambiguousClosenessThreshold = ambiguousClosenessThresholdParameter; | ||
@@ -44,2 +58,3 @@ const lowConfidenceScoreThreshold = lowConfidenceScoreThresholdParameter; | ||
utility_1.Utility.debuggingLog(`baseModelPath=${baseModelPath}`); | ||
utility_1.Utility.debuggingLog(`entityBaseModelPath=${entityBaseModelPath}`); | ||
utility_1.Utility.debuggingLog(`ambiguousClosenessThreshold=${ambiguousClosenessThreshold}`); | ||
@@ -66,3 +81,3 @@ utility_1.Utility.debuggingLog(`lowConfidenceScoreThreshold=${lowConfidenceScoreThreshold}`); | ||
utility_1.Utility.debuggingLog('OrchestratorTest.runAsync(), ready to call LabelResolver.createAsync()'); | ||
await labelresolver_1.LabelResolver.createAsync(baseModelPath); | ||
await labelresolver_1.LabelResolver.createAsync(baseModelPath, entityBaseModelPath); | ||
utility_1.Utility.debuggingLog('OrchestratorTest.runAsync(), after calling LabelResolver.createAsync()'); | ||
@@ -69,0 +84,0 @@ utility_1.Utility.debuggingLog('OrchestratorTest.runAsync(), ready to call UtilityLabelResolver.resetLabelResolverSettingUseCompactEmbeddings()'); |
{ | ||
"name": "@microsoft/bf-orchestrator", | ||
"description": "APIs to interact with BF Orchestrator.", | ||
"version": "4.11.0-beta.20201203.9b18c73", | ||
"version": "4.11.0-beta.20201203.cd29e25", | ||
"author": "Microsoft", | ||
@@ -31,7 +31,7 @@ "bugs": "https://github.com/microsoft/botframework-cli/issues", | ||
"@microsoft/bf-lu": "next", | ||
"@microsoft/bf-dispatcher": "4.11.0-beta.20201203.9b18c73", | ||
"@microsoft/bf-dispatcher": "4.11.0-beta.20201203.cd29e25", | ||
"@types/node-fetch": "~2.5.5", | ||
"node-fetch": "~2.6.0", | ||
"tslib": "^1.10.0", | ||
"orchestrator-core": "beta", | ||
"orchestrator-core": "4.11.1-beta.5", | ||
"@types/fs-extra": "~8.1.0", | ||
@@ -38,0 +38,0 @@ "fs-extra": "~9.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
695535
7459
+ Added@microsoft/bf-dispatcher@4.11.0-beta.20201203.cd29e25(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addeddecompress-response@4.2.1(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedmimic-response@2.1.0(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addednode-abi@2.30.1(transitive)
+ Addednoop-logger@0.1.1(transitive)
+ Addedonnxruntime@1.4.0(transitive)
+ Addedorchestrator-core@4.11.1-beta.5(transitive)
+ Addedprebuild-install@5.3.6(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.1(transitive)
+ Addedtar-fs@2.1.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedwhich-pm-runs@1.1.0(transitive)
- Removed@microsoft/bf-dispatcher@4.11.0-beta.20201203.9b18c73(transitive)
- Removedorchestrator-core@4.13.0-dev.20210322.90afa96h(transitive)
Updated@microsoft/bf-dispatcher@4.11.0-beta.20201203.cd29e25