Fix typo in 'evaluatorLogPaths'
This commit is contained in:
@@ -94,12 +94,12 @@ export class LogScannerService extends DisposableObject {
|
||||
public async scanEvalLog(query: QueryHistoryInfo | undefined): Promise<void> {
|
||||
this.diagnosticCollection.clear();
|
||||
|
||||
if (query?.t !== "local" || query.evalutorLogPaths === undefined) {
|
||||
if (query?.t !== "local" || query.evaluatorLogPaths === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { summarySymbols, jsonSummary, humanReadableSummary } =
|
||||
query.evalutorLogPaths;
|
||||
query.evaluatorLogPaths;
|
||||
|
||||
if (jsonSummary === undefined || humanReadableSummary === undefined) {
|
||||
return;
|
||||
|
||||
@@ -781,7 +781,7 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
|
||||
private async warnNoEvalLogSummary(item: LocalQueryInfo) {
|
||||
const evalLogLocation =
|
||||
item.evalutorLogPaths?.log ?? item.initialInfo.outputDir?.evalLogPath;
|
||||
item.evaluatorLogPaths?.log ?? item.initialInfo.outputDir?.evalLogPath;
|
||||
|
||||
// Summary log file doesn't exist.
|
||||
if (evalLogLocation && (await pathExists(evalLogLocation))) {
|
||||
@@ -801,7 +801,7 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
}
|
||||
|
||||
const evalLogLocation =
|
||||
item.evalutorLogPaths?.log ?? item.initialInfo.outputDir?.evalLogPath;
|
||||
item.evaluatorLogPaths?.log ?? item.initialInfo.outputDir?.evalLogPath;
|
||||
|
||||
if (evalLogLocation && (await pathExists(evalLogLocation))) {
|
||||
await tryOpenExternalFile(this.app.commands, evalLogLocation);
|
||||
@@ -816,14 +816,14 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
}
|
||||
|
||||
// If the summary file location wasn't saved, display error
|
||||
if (!item.evalutorLogPaths?.humanReadableSummary) {
|
||||
if (!item.evaluatorLogPaths?.humanReadableSummary) {
|
||||
await this.warnNoEvalLogSummary(item);
|
||||
return;
|
||||
}
|
||||
|
||||
await tryOpenExternalFile(
|
||||
this.app.commands,
|
||||
item.evalutorLogPaths.humanReadableSummary,
|
||||
item.evaluatorLogPaths.humanReadableSummary,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
}
|
||||
|
||||
// If the JSON summary file location wasn't saved, display error
|
||||
if (item.evalutorLogPaths?.jsonSummary === undefined) {
|
||||
if (item.evaluatorLogPaths?.jsonSummary === undefined) {
|
||||
await this.warnNoEvalLogSummary(item);
|
||||
return;
|
||||
}
|
||||
@@ -841,7 +841,7 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
// TODO(angelapwen): Stream the file in.
|
||||
try {
|
||||
const evalLogData: EvalLogData[] = await parseViewerData(
|
||||
item.evalutorLogPaths.jsonSummary,
|
||||
item.evaluatorLogPaths.jsonSummary,
|
||||
);
|
||||
const evalLogTreeBuilder = new EvalLogTreeBuilder(
|
||||
item.getQueryName(),
|
||||
@@ -850,7 +850,7 @@ export class QueryHistoryManager extends DisposableObject {
|
||||
this.evalLogViewer.updateRoots(await evalLogTreeBuilder.getRoots());
|
||||
} catch {
|
||||
throw new Error(
|
||||
`Could not read evaluator log summary JSON file to generate viewer data at ${item.evalutorLogPaths.jsonSummary}.`,
|
||||
`Could not read evaluator log summary JSON file to generate viewer data at ${item.evaluatorLogPaths.jsonSummary}.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ export function mapLocalQueryInfoToDto(
|
||||
return {
|
||||
initialInfo: mapInitialQueryInfoToDto(query.initialInfo),
|
||||
t: "local",
|
||||
evalLogLocation: query.evalutorLogPaths?.log,
|
||||
evalLogSummaryLocation: query.evalutorLogPaths?.humanReadableSummary,
|
||||
jsonEvalLogSummaryLocation: query.evalutorLogPaths?.jsonSummary,
|
||||
evalLogSummarySymbolsLocation: query.evalutorLogPaths?.summarySymbols,
|
||||
evalLogLocation: query.evaluatorLogPaths?.log,
|
||||
evalLogSummaryLocation: query.evaluatorLogPaths?.humanReadableSummary,
|
||||
jsonEvalLogSummaryLocation: query.evaluatorLogPaths?.jsonSummary,
|
||||
evalLogSummarySymbolsLocation: query.evaluatorLogPaths?.summarySymbols,
|
||||
failureReason: query.failureReason,
|
||||
completedQuery:
|
||||
query.completedQuery && mapCompletedQueryToDto(query.completedQuery),
|
||||
|
||||
@@ -200,7 +200,7 @@ export class LocalQueryInfo {
|
||||
private cancellationSource?: CancellationTokenSource, // used to cancel in progress queries
|
||||
public failureReason?: string,
|
||||
public completedQuery?: CompletedQueryInfo,
|
||||
public evalutorLogPaths?: EvaluatorLogPaths,
|
||||
public evaluatorLogPaths?: EvaluatorLogPaths,
|
||||
) {
|
||||
/**/
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export class LocalQueryInfo {
|
||||
|
||||
/** Sets the paths to the various structured evaluator logs. */
|
||||
public setEvaluatorLogPaths(logPaths: EvaluatorLogPaths): void {
|
||||
this.evalutorLogPaths = logPaths;
|
||||
this.evaluatorLogPaths = logPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user