Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle perturbations in run predictions frontend #2950

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

yifanmai
Copy link
Collaborator

Fixes #2940

Frontend now displays perturbations like so:

Screenshot 2024-08-27 113433

@yifanmai yifanmai requested a review from farzaank August 27, 2024 18:43
@@ -45,10 +45,10 @@ export default function Run() {
const [instances, setInstances] = useState<Instance[]>([]);
const [stats, setStats] = useState<Stat[]>([]);
const [displayPredictionsMap, setDisplayPredictionsMap] = useState<
DisplayPredictionsMap | undefined
undefined | { [key: string]: { [key: string]: DisplayPrediction[] } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: undefined | Record<string, Record<string, DisplayPrediction[]>> is a little cleaner

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

>();
const [displayRequestsMap, setDisplayRequestsMap] = useState<
DisplayRequestsMap | undefined
undefined | { [key: string]: { [key: string]: DisplayRequest[] } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above about Record

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@yifanmai yifanmai merged commit eb3313b into main Aug 29, 2024
3 checks passed
@yifanmai yifanmai deleted the yifanmai/fix-perturbation-frontend branch August 29, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perturbations are incorrectly displayed in frontend
2 participants