Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0' of https://github.com/voxel51/fiftyone
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
voxel51-bot committed Nov 19, 2024
2 parents 15e7ece + 01ea636 commit ebf8784
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 31 deletions.
13 changes: 10 additions & 3 deletions app/packages/components/src/components/PanelCTA/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default function PanelCTA(props: PanelCTAProps) {
mode,
name,
onBack,
tryLink,
demoDocCaption,
} = props;
const theme = useTheme();
const isDefault = mode === "default";
Expand All @@ -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 (
<Stack spacing={1} sx={{ height: "100%", p: 2 }}>
Expand Down Expand Up @@ -114,7 +119,7 @@ export default function PanelCTA(props: PanelCTAProps) {
<MuiButton
variant="contained"
color="primary"
href={TRY_IN_BROWSER_LINK}
href={tryLink || TRY_IN_BROWSER_LINK}
target="_blank"
>
Try in browser
Expand All @@ -127,9 +132,9 @@ export default function PanelCTA(props: PanelCTAProps) {
spacing={1}
sx={{ alignItems: "center", justifyContent: "center" }}
>
{docCaption && (
{computedDocCaption && (
<Typography color="secondary">
{docCaption || "Not ready to upgrade yet?"}
{computedDocCaption}
</Typography>
)}
<MuiButton
Expand Down Expand Up @@ -179,4 +184,6 @@ export type PanelCTAProps = {
demoLabel?: string;
demoDescription?: string;
demoCaption?: string;
demoDocCaption?: string;
tryLink?: string;
};
2 changes: 1 addition & 1 deletion app/packages/core/src/components/Starter/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const CONTENT_BY_MODE = {
codeSubtitle:
"Use Python or command line tools to set dataset for the current session",
learnMoreLink: "https://docs.voxel51.com/user_guide/app.html",
learnMoreLabel: "about using the Fiftyone App",
learnMoreLabel: "about using the FiftyOne App",
},
ADD_SAMPLE: {
title: "No samples yet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { formatValue, getNumericDifference, useTriggerEvent } from "./utils";

const KEY_COLOR = "#ff6d04";
const COMPARE_KEY_COLOR = "#03a9f4";
const DEFAULT_BAR_CONFIG = { sortBy: "az" };
const DEFAULT_BAR_CONFIG = { sortBy: "default" };

export default function Evaluation(props: EvaluationProps) {
const {
Expand Down Expand Up @@ -164,11 +164,15 @@ export default function Evaluation(props: EvaluationProps) {
const evaluationTimestamp = evaluationInfo.timestamp;
const evaluationConfig = evaluationInfo.config;
const evaluationMetrics = evaluation.metrics;
const evaluationType = evaluationConfig.type;
const compareEvaluationInfo = compareEvaluation?.info || {};
const compareEvaluationKey = compareEvaluationInfo?.key;
const compareEvaluationTimestamp = compareEvaluationInfo?.timestamp;
const compareEvaluationConfig = compareEvaluationInfo?.config || {};
const compareEvaluationMetrics = compareEvaluation?.metrics || {};
const compareEvaluationType = compareEvaluationConfig.type;
const isObjectDetection = evaluationType === "detection";
const isSegmentation = evaluationType === "segmentation";
const infoRows = [
{
id: "evaluation_key",
Expand All @@ -179,8 +183,8 @@ export default function Evaluation(props: EvaluationProps) {
{
id: "type",
property: "Type",
value: evaluationConfig.type,
compareValue: compareEvaluationConfig.type,
value: evaluationType,
compareValue: compareEvaluationType,
},
{
id: "method",
Expand Down Expand Up @@ -322,6 +326,7 @@ export default function Evaluation(props: EvaluationProps) {
property: "Average Confidence",
value: evaluationMetrics.average_confidence,
compareValue: compareEvaluationMetrics.average_confidence,
hide: isSegmentation,
},
{
id: "support",
Expand All @@ -340,6 +345,7 @@ export default function Evaluation(props: EvaluationProps) {
property: "IoU Threshold",
value: evaluationConfig.iou,
compareValue: compareEvaluationConfig.iou,
hide: !isObjectDetection,
},
{
id: "precision",
Expand All @@ -364,6 +370,7 @@ export default function Evaluation(props: EvaluationProps) {
property: "mAP",
value: evaluationMetrics.mAP,
compareValue: compareEvaluationMetrics.mAP,
hide: !isObjectDetection,
},
{
id: "tp",
Expand All @@ -377,6 +384,7 @@ export default function Evaluation(props: EvaluationProps) {
? "compare"
: "selected"
: false,
hide: !isObjectDetection,
},
{
id: "fp",
Expand All @@ -391,6 +399,7 @@ export default function Evaluation(props: EvaluationProps) {
? "compare"
: "selected"
: false,
hide: !isObjectDetection,
},
{
id: "fn",
Expand All @@ -405,6 +414,7 @@ export default function Evaluation(props: EvaluationProps) {
? "compare"
: "selected"
: false,
hide: !isObjectDetection,
},
];

Expand Down Expand Up @@ -630,7 +640,9 @@ export default function Evaluation(props: EvaluationProps) {
filterable,
id: rowId,
active,
hide,
} = row;
if (hide) return null;
const difference = getNumericDifference(
value,
compareValue
Expand Down Expand Up @@ -670,7 +682,13 @@ export default function Evaluation(props: EvaluationProps) {
alignItems: "center",
}}
>
<Typography>{formatValue(value)}</Typography>
<Typography>
{value ? (
formatValue(value)
) : (
<Typography color="text.tertiary"></Typography>
)}
</Typography>
<Stack direction="row" spacing={1}>
{showTrophy && (
<Typography sx={{ fontSize: 12 }}>
Expand Down Expand Up @@ -706,7 +724,13 @@ export default function Evaluation(props: EvaluationProps) {
sx={{ justifyContent: "space-between" }}
>
<Typography>
{formatValue(compareValue)}
{compareValue ? (
formatValue(compareValue)
) : (
<Typography color="text.tertiary">
</Typography>
)}
</Typography>

{filterable && (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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 (
<CardActionArea key={eval_key} disabled={pending}>
<Card
Expand All @@ -77,7 +86,16 @@ function EvaluationCard(props: EvaluationCardProps) {
{eval_key}
</Typography>
{pending && (
<Chip variant="filled" label={<LoadingDots text="Evaluating" />} />
<Chip
variant="filled"
size="small"
label={
<LoadingDots
text="Evaluating"
style={{ fontSize: "1rem", paddingLeft: 6, color: "#999999" }}
/>
}
/>
)}
{status && <Status status={status} />}
</Stack>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -87,10 +88,11 @@ export default function NativeModelEvaluationView(props) {
(showEmptyOverview || showCTA ? (
<PanelCTA
label="Create you first model evaluation"
demoLabel="Upgrade to Fiftyone Teams to Evaluate Models"
demoLabel="Upgrade to FiftyOne Teams to Evaluate Models"
description="Analyze and improve models collaboratively with your team"
docLink="https://docs.voxel51.com/user_guide/evaluation.html"
docCaption="Not ready to upgrade yet? Learn how to create model evaluation via code."
docCaption="Learn how to create model evaluation via code."
demoDocCaption="Not ready to upgrade yet? Learn how to create model evaluation via code."
icon="ssid_chart"
Actions={() => {
return (
Expand All @@ -106,6 +108,7 @@ export default function NativeModelEvaluationView(props) {
setShowCTA(false);
}}
mode={showCTA ? "default" : "onboarding"}
tryLink={TRY_LINK}
/>
) : (
<Overview
Expand Down
2 changes: 1 addition & 1 deletion app/packages/embeddings/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Embeddings Fiftyone Plugin Example
# Embeddings FiftyOne Plugin Example
8 changes: 6 additions & 2 deletions app/packages/embeddings/src/EmbeddingsCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { PanelCTA, PanelCTAProps } from "@fiftyone/components";
import ComputeVisualizationButton from "./ComputeVisualizationButton";
import useComputeVisualization from "./useComputeVisualization";

const TRY_LINK = "http://voxel51.com/try-embeddings";

export function Actions(props: ActionsProps) {
const computeViz = useComputeVisualization();
const defaultHandler = () => computeViz.prompt();
Expand All @@ -14,15 +16,17 @@ export default function EmbeddingsCTA(props: EmbeddingsCTAProps) {
return (
<PanelCTA
label="Embeddings help you explore and understand your dataset"
demoLabel="Upgrade to Fiftyone Teams to Create Embeddings"
demoLabel="Upgrade to FiftyOne Teams to Create Embeddings"
description="You can compute and visualize embeddings for your dataset using a selection of pre-trained models or your own embeddings"
docLink="https://docs.voxel51.com/user_guide/app.html#embeddings-panel"
docCaption="Not ready to upgrade yet? Learn how to create embeddings visualizations via code."
docCaption="Learn how to create embeddings visualizations via code."
demoDocCaption="Not ready to upgrade yet? Learn how to create embeddings visualizations via code."
icon="workspaces"
Actions={Actions}
name="Embeddings"
onBack={onBack}
mode={mode}
tryLink={TRY_LINK}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/packages/map/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Map Fiftyone Plugin Example
# Map FiftyOne Plugin Example
2 changes: 1 addition & 1 deletion app/packages/operators/README.md
Original file line number Diff line number Diff line change
@@ -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`.
2 changes: 1 addition & 1 deletion docs/source/tutorials/pointe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
2 changes: 1 addition & 1 deletion fiftyone/core/threed/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
3D definitions for Fiftyone.
3D definitions for FiftyOne.
| Copyright 2017-2024, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
Expand Down
2 changes: 1 addition & 1 deletion fiftyone/core/threed/object_3d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Fiftyone 3D Object3D base class.
FiftyOne 3D Object3D base class.
| Copyright 2017-2024, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
Expand Down
2 changes: 1 addition & 1 deletion fiftyone/internal/secrets/secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading

0 comments on commit ebf8784

Please sign in to comment.