Skip to content

Commit

Permalink
Name change
Browse files Browse the repository at this point in the history
  • Loading branch information
tssweeney committed Jan 3, 2025
1 parent b37bae4 commit e357a2b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ const CompareEvaluationsPageInner: React.FC<{
const showExampleFilter =
Object.keys(state.summary.evaluationCalls).length === 2;
const showExamples =
Object.keys(state.results.result?.resultRows ?? {}).length > 0;
const resultsLoading = state.results.loading;
Object.keys(state.loadableComparisonResults.result?.resultRows ?? {}).length > 0;
const resultsLoading = state.loadableComparisonResults.loading;
return (
<Box
sx={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export type EvaluationComparisonState = {
// The normalized data for the evaluations
summary: EvaluationComparisonSummary;
// The results of the evaluations
results: Loadable<EvaluationComparisonResults>;
loadableComparisonResults: Loadable<EvaluationComparisonResults>;
// The dimensions to compare & filter results
comparisonDimensions?: ComparisonDimensionsType;
// The current digest which is in view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ export const useFilteredAggregateRows = (state: EvaluationComparisonState) => {

const flattenedRows = useMemo(() => {
const rows: FlattenedRow[] = [];
Object.entries(state.results.result?.resultRows ?? {}).forEach(
Object.entries(state.loadableComparisonResults.result?.resultRows ?? {}).forEach(
([rowDigest, rowCollection]) => {
Object.values(rowCollection.evaluations).forEach(modelCollection => {
Object.values(modelCollection.predictAndScores).forEach(
predictAndScoreRes => {
const datasetRow =
state.results.result?.inputs[predictAndScoreRes.rowDigest];
state.loadableComparisonResults.result?.inputs[predictAndScoreRes.rowDigest];
if (datasetRow != null) {
const output = predictAndScoreRes._rawPredictTraceData?.output;
rows.push({
Expand Down Expand Up @@ -170,8 +170,8 @@ export const useFilteredAggregateRows = (state: EvaluationComparisonState) => {
);
return rows;
}, [
state.results.result?.resultRows,
state.results.result?.inputs,
state.loadableComparisonResults.result?.resultRows,
state.loadableComparisonResults.result?.inputs,
state.summary.scoreMetrics,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const SingleDimensionFilter: React.FC<{
);

if (baselineTargetDimension != null && compareTargetDimension != null) {
Object.entries(props.state.results.result?.resultRows ?? {}).forEach(
Object.entries(props.state.loadableComparisonResults.result?.resultRows ?? {}).forEach(
([digest, row]) => {
const xVals: number[] = [];
const yVals: number[] = [];
Expand Down Expand Up @@ -232,7 +232,7 @@ const SingleDimensionFilter: React.FC<{
compareCallId,
compositeMetricsMap,
filteredDigest,
props.state.results.result?.resultRows,
props.state.loadableComparisonResults.result?.resultRows,
targetDimension,
]);

Expand Down

0 comments on commit e357a2b

Please sign in to comment.