diff --git a/app/packages/components/src/components/PanelCTA/index.tsx b/app/packages/components/src/components/PanelCTA/index.tsx index 55834a4ff2..4506558526 100644 --- a/app/packages/components/src/components/PanelCTA/index.tsx +++ b/app/packages/components/src/components/PanelCTA/index.tsx @@ -33,6 +33,8 @@ export default function PanelCTA(props: PanelCTAProps) { mode, name, onBack, + tryLink, + demoDocCaption, } = props; const theme = useTheme(); const isDefault = mode === "default"; @@ -43,6 +45,9 @@ export default function PanelCTA(props: PanelCTAProps) { const computedCaption = IS_APP_MODE_FIFTYONE ? demoCaption || caption : caption; + const computedDocCaption = IS_APP_MODE_FIFTYONE + ? demoDocCaption || docCaption + : docCaption; return ( @@ -114,7 +119,7 @@ export default function PanelCTA(props: PanelCTAProps) { Try in browser @@ -127,9 +132,9 @@ export default function PanelCTA(props: PanelCTAProps) { spacing={1} sx={{ alignItems: "center", justifyContent: "center" }} > - {docCaption && ( + {computedDocCaption && ( - {docCaption || "Not ready to upgrade yet?"} + {computedDocCaption} )} - {formatValue(value)} + + {value ? ( + formatValue(value) + ) : ( + + )} + {showTrophy && ( @@ -706,7 +724,13 @@ export default function Evaluation(props: EvaluationProps) { sx={{ justifyContent: "space-between" }} > - {formatValue(compareValue)} + {compareValue ? ( + formatValue(compareValue) + ) : ( + + — + + )} {filterable && ( @@ -1516,7 +1540,7 @@ function getMatrix(matrices, config) { function getConfigLabel({ config, type, dashed }) { const { sortBy } = config; - if (!sortBy) return ""; + if (!sortBy || sortBy === DEFAULT_BAR_CONFIG.sortBy) return ""; const sortByLabels = type === "classPerformance" ? CLASS_PERFORMANCE_SORT_OPTIONS @@ -1558,12 +1582,14 @@ function useActiveFilter(evaluation, compareEvaluation) { } const CLASS_PERFORMANCE_SORT_OPTIONS = [ + { value: "default", label: "Default" }, { value: "az", label: "Alphabetical (A-Z)" }, { value: "za", label: "Alphabetical (Z-A)" }, { value: "best", label: "Best performing" }, { value: "worst", label: "Worst performing" }, ]; const CONFUSION_MATRIX_SORT_OPTIONS = [ + { value: "default", label: "Default" }, { value: "az", label: "Alphabetical (A-Z)" }, { value: "za", label: "Alphabetical (Z-A)" }, { value: "mc", label: "Most common classes" }, diff --git a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/EvaluationPlot.tsx b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/EvaluationPlot.tsx index 81c8dee348..0f2b5671e4 100644 --- a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/EvaluationPlot.tsx +++ b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/EvaluationPlot.tsx @@ -31,6 +31,7 @@ export default function EvaluationPlot(props: EvaluationPlotProps) { color: theme.text.secondary, gridcolor: theme.primary.softBorder, automargin: true, // Enable automatic margin adjustment + scaleanchor: "x", }, autosize: true, margin: { t: 20, l: 50, b: 50, r: 20, pad: 0 }, diff --git a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/Overview.tsx b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/Overview.tsx index 85532c38a1..b0aa8f99d8 100644 --- a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/Overview.tsx +++ b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/Overview.tsx @@ -1,5 +1,12 @@ import { LoadingDots } from "@fiftyone/components"; -import { Card, CardActionArea, Chip, Stack, Typography } from "@mui/material"; +import { + Card, + CardActionArea, + Chip, + Stack, + Typography, + useTheme, +} from "@mui/material"; import React from "react"; import Evaluate from "./Evaluate"; import EvaluationNotes from "./EvaluationNotes"; @@ -64,6 +71,8 @@ export default function Overview(props: OverviewProps) { function EvaluationCard(props: EvaluationCardProps) { const { pending, onSelect, eval_key, note, status, id } = props; + const theme = useTheme(); + return ( {pending && ( - } /> + + } + /> )} {status && } diff --git a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/index.tsx b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/index.tsx index f02f8ed013..13b8fc6215 100644 --- a/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/index.tsx +++ b/app/packages/core/src/plugins/SchemaIO/components/NativeModelEvaluationView/index.tsx @@ -1,12 +1,13 @@ +import { PanelCTA } from "@fiftyone/components"; +import { constants } from "@fiftyone/utilities"; import { Box } from "@mui/material"; import React, { useCallback, useMemo } from "react"; -import EmptyOverview from "./EmptyOverview"; +import Evaluate from "./Evaluate"; import Evaluation from "./Evaluation"; import Overview from "./Overview"; import { useTriggerEvent } from "./utils"; -import { PanelCTA } from "@fiftyone/components"; -import { constants } from "@fiftyone/utilities"; -import Evaluate from "./Evaluate"; + +const TRY_LINK = "http://voxel51.com/try-evaluation"; export default function NativeModelEvaluationView(props) { const { data = {}, schema, onChange, layout } = props; @@ -87,10 +88,11 @@ export default function NativeModelEvaluationView(props) { (showEmptyOverview || showCTA ? ( { return ( @@ -106,6 +108,7 @@ export default function NativeModelEvaluationView(props) { setShowCTA(false); }} mode={showCTA ? "default" : "onboarding"} + tryLink={TRY_LINK} /> ) : ( computeViz.prompt(); @@ -14,15 +16,17 @@ export default function EmbeddingsCTA(props: EmbeddingsCTAProps) { return ( ); } diff --git a/app/packages/map/README.md b/app/packages/map/README.md index 92cc2a9d3f..ea13c2ec5a 100644 --- a/app/packages/map/README.md +++ b/app/packages/map/README.md @@ -1 +1 @@ -# Map Fiftyone Plugin Example +# Map FiftyOne Plugin Example diff --git a/app/packages/operators/README.md b/app/packages/operators/README.md index 55f85b394c..248fc1c4fa 100644 --- a/app/packages/operators/README.md +++ b/app/packages/operators/README.md @@ -1,3 +1,3 @@ # FiftyOne Operators -The browser implemenation of the Fiftyone plugin system's `Operators`. +The browser implemenation of the FiftyOne plugin system's `Operators`. diff --git a/docs/source/tutorials/pointe.ipynb b/docs/source/tutorials/pointe.ipynb index 6e09cfdf86..4578ea69ac 100644 --- a/docs/source/tutorials/pointe.ipynb +++ b/docs/source/tutorials/pointe.ipynb @@ -5,7 +5,7 @@ "id": "8527d902-f8b0-43c2-84ad-b9ee5e83121e", "metadata": {}, "source": [ - "# Build a 3D self-driving dataset from scratch with OpenAI's Point-E and Fiftyone" + "# Build a 3D self-driving dataset from scratch with OpenAI's Point-E and FiftyOne" ] }, { diff --git a/e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh b/e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh index 58b49f931d..8de341806c 100755 --- a/e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh +++ b/e2e-pw/scripts/generate-screenshots-docker-image/build-docker-image.sh @@ -15,7 +15,7 @@ SCRIPTS_DIR="$(dirname "$SCREENSHOT_SCRIPTS_DIR")" E2E_ROOT_DIR="$(dirname "$SCRIPTS_DIR")" FIFTYONE_ROOT_DIR="$(dirname "$E2E_ROOT_DIR")" -echo "Fiftyone root dir: $FIFTYONE_ROOT_DIR" +echo "FiftyOne root dir: $FIFTYONE_ROOT_DIR" # copy fiftyone directory into .build echo "Copying fiftyone directory into .build..." diff --git a/fiftyone/core/threed/__init__.py b/fiftyone/core/threed/__init__.py index 7bfa2aec46..cdb0fc3e97 100644 --- a/fiftyone/core/threed/__init__.py +++ b/fiftyone/core/threed/__init__.py @@ -1,5 +1,5 @@ """ -3D definitions for Fiftyone. +3D definitions for FiftyOne. | Copyright 2017-2024, Voxel51, Inc. | `voxel51.com `_ diff --git a/fiftyone/core/threed/object_3d.py b/fiftyone/core/threed/object_3d.py index 8ee213322f..c0c1c33554 100644 --- a/fiftyone/core/threed/object_3d.py +++ b/fiftyone/core/threed/object_3d.py @@ -1,5 +1,5 @@ """ -Fiftyone 3D Object3D base class. +FiftyOne 3D Object3D base class. | Copyright 2017-2024, Voxel51, Inc. | `voxel51.com `_ diff --git a/fiftyone/internal/secrets/secret.py b/fiftyone/internal/secrets/secret.py index 528dfb2831..46e48b83a8 100644 --- a/fiftyone/internal/secrets/secret.py +++ b/fiftyone/internal/secrets/secret.py @@ -87,7 +87,7 @@ def is_encrypted(self) -> bool: class UnencryptedSecret(AbstractSecret): """ - Fiftyone secret with plaintext value. + FiftyOne secret with plaintext value. """ def __init__(self, key: str, value: str): diff --git a/fiftyone/operators/builtins/panels/model_evaluation/__init__.py b/fiftyone/operators/builtins/panels/model_evaluation/__init__.py index 34c1aa3b80..fd6a2f3c9a 100644 --- a/fiftyone/operators/builtins/panels/model_evaluation/__init__.py +++ b/fiftyone/operators/builtins/panels/model_evaluation/__init__.py @@ -242,31 +242,38 @@ def get_confusion_matrix_colorscale(self, matrix): return colorscale def get_confusion_matrices(self, results): - classes = results.classes + default_classes = results.classes freq = Counter(results.ytrue) if results.missing in freq: freq.pop(results.missing) - az_classes = sorted(classes) - za_classes = sorted(classes, reverse=True) + az_classes = sorted(default_classes) + za_classes = sorted(default_classes, reverse=True) mc_classes = sorted(freq, key=freq.get, reverse=True) lc_classes = sorted(freq, key=freq.get) + default_matrix = results.confusion_matrix() az_matrix = results.confusion_matrix(classes=az_classes) za_matrix = results.confusion_matrix(classes=za_classes) mc_matrix = results.confusion_matrix(classes=mc_classes) lc_matrix = results.confusion_matrix(classes=lc_classes) + default_colorscale = self.get_confusion_matrix_colorscale( + default_matrix + ) az_colorscale = self.get_confusion_matrix_colorscale(az_matrix) za_colorscale = self.get_confusion_matrix_colorscale(za_matrix) mc_colorscale = self.get_confusion_matrix_colorscale(mc_matrix) lc_colorscale = self.get_confusion_matrix_colorscale(lc_matrix) return { + "default_classes": default_classes.tolist(), "az_classes": az_classes, "za_classes": za_classes, "mc_classes": mc_classes, "lc_classes": lc_classes, + "default_matrix": default_matrix.tolist(), "az_matrix": az_matrix.tolist(), "za_matrix": za_matrix.tolist(), "mc_matrix": mc_matrix.tolist(), "lc_matrix": lc_matrix.tolist(), + "default_colorscale": default_colorscale, "az_colorscale": az_colorscale, "za_colorscale": za_colorscale, "mc_colorscale": mc_colorscale,