Skip to content

Commit

Permalink
Merge pull request #140 from neulab/fix/leaderboard
Browse files Browse the repository at this point in the history
Fix split tab placeholder & auto-resetting buckets in analysis
  • Loading branch information
lyuyangh authored Apr 26, 2022
2 parents 3433099 + fae1fcc commit fbbb391
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions frontend/src/components/Analysis/AnalysisDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function AnalysisDrawer({

useEffect(() => {
async function refreshAnalyses(
featureKeyToBucketInfo: SystemsAnalysesBody["feature_to_bucket_info"]
featureKeyToBucketInfoToPost: SystemsAnalysesBody["feature_to_bucket_info"]
) {
setPageState(PageState.loading);
const systemAnalysesReturn: SystemAnalysesReturn | null =
Expand All @@ -62,7 +62,7 @@ export function AnalysisDrawer({
system_ids: activeSystemIDs.join(","),
// Hardcoded to false. TODO(chihhao) wait for SDK's update
pairwise_performance_gap: false,
feature_to_bucket_info: featureKeyToBucketInfo,
feature_to_bucket_info: featureKeyToBucketInfoToPost,
})
.then((systemAnalysesReturn) => {
clearTimeout(timeoutID);
Expand Down Expand Up @@ -122,7 +122,10 @@ export function AnalysisDrawer({
0,
bucketRightBounds.length - 1
),
updated: false,
/* A bucket may remain updated (i.e. different from the init value of SDK)
across multiple post calls, so we must reuse this information from the state
*/
updated: featureKeyToBucketInfo[featureKey]?.updated || false,
};
}
}
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/SystemsTable/SystemTableTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ export function SystemTableTools({
value: opt,
label: opt,
}))}
value={value.split}
onChange={(value) => onChange({ split: value })}
placeholder="Dataset split"
onChange={(value) => onChange({ split: value })}
style={{ minWidth: "120px" }}
/>
<TaskSelect
Expand Down

0 comments on commit fbbb391

Please sign in to comment.