Skip to content

Commit a78d90a

Browse files
authored
Merge branch 'main' into DLS_NEW_SAMPLE_VALVE
2 parents 877e852 + fae1a61 commit a78d90a

File tree

11 files changed

+93
-39
lines changed

11 files changed

+93
-39
lines changed

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/components/shared/CopyPipelineButton.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const CopyPipelineButton = ({
3636
const selectedPipeline = pipelines[selectedTag];
3737

3838
const [name, setName] = useState(`Copy of ${baseName} [${tags[0] || ""}]`);
39+
const [nameError, setNameError] = useState(false);
3940
const [description, setDescription] = useState(pipelineDescription);
4041
const [isNameManuallyEdited, setIsNameManuallyEdited] = useState(false);
4142

@@ -92,9 +93,15 @@ const CopyPipelineButton = ({
9293
const errorMessage = isApiError(error)
9394
? error.data.message
9495
: "Unknown error";
95-
toast.error("Failed to copy pipeline", {
96-
description: errorMessage,
97-
});
96+
97+
if (errorMessage.startsWith("Invalid version")) {
98+
setNameError(true);
99+
} else {
100+
toast.error("Failed to copy pipeline", {
101+
description: errorMessage,
102+
});
103+
}
104+
98105
console.error("Failed to copy pipeline:", error);
99106
}
100107
};
@@ -149,6 +156,9 @@ const CopyPipelineButton = ({
149156
placeholder="Enter pipeline name..."
150157
className="w-full px-3 py-2 border"
151158
/>
159+
{nameError && (
160+
<span className="text-destructive">This name already exists</span>
161+
)}
152162
</div>
153163

154164
<div>

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/components/shared/ParticipationSlider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const ParticipationSlider = ({
4141
min={min}
4242
max={max}
4343
className="w-[4rem] px-2 py-1 text-sm font-medium text-center border"
44+
disabled={true}
4445
/>
4546
<span className="text-sm text-gray-600">%</span>
4647
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const SaveOutputWarning = () => {
2+
return (
3+
<div className="text-muted-foreground border border-amber-400 my-2 p-2 bg-amber-200/50 w-1/2">
4+
<b>Note 1</b>: The current implementation does not automatically infer the
5+
best encoding device from the existing pipeline. Select the same device
6+
that is already used by other blocks in your pipeline. To learn more,
7+
refer to our documentation:{" "}
8+
<a
9+
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/index.html"
10+
target="_blank"
11+
rel="noopener noreferrer"
12+
className="hover:text-classic-blue transition-colors underline"
13+
>
14+
link
15+
</a>
16+
.
17+
<br />
18+
<b>Note 2</b>: Selecting this option will negatively impact the
19+
performance results.
20+
</div>
21+
);
22+
};
23+
24+
export default SaveOutputWarning;

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/components/shared/StreamsSlider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const StreamsSlider = ({
4141
min={min}
4242
max={max}
4343
className="w-[4rem] px-2 py-1 text-sm font-medium text-center border"
44+
disabled={true}
4445
/>
4546
</div>
4647
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export const formatElapsedTimeMillis = (milliseconds: number) => {
2+
const seconds = milliseconds / 1000;
3+
const mins = Math.floor(seconds / 60);
4+
const secs = Math.floor(seconds % 60);
5+
return `${mins}m ${secs}s`;
6+
};
7+
8+
export const formatElapsedTimeSeconds = (seconds: number) => {
9+
const mins = Math.floor(seconds / 60);
10+
const secs = Math.floor(seconds % 60);
11+
return `${mins}m ${secs}s`;
12+
};

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/pages/DensityTests.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
import { Plus, X } from "lucide-react";
2020
import { ParticipationSlider } from "@/components/shared/ParticipationSlider";
2121
import DeviceSelect from "@/components/shared/DeviceSelect";
22+
import SaveOutputWarning from "@/components/shared/SaveOutputWarning.tsx";
2223

2324
interface PipelineSelection {
2425
pipelineId: string;
@@ -43,7 +44,7 @@ const DensityTests = () => {
4344
streams_per_pipeline: PipelinePerformanceSpec[] | null;
4445
video_output_paths: { [key: string]: string[] } | null;
4546
} | null>(null);
46-
const [videoOutputEnabled, setVideoOutputEnabled] = useState(true);
47+
const [videoOutputEnabled, setVideoOutputEnabled] = useState(false);
4748
const [errorMessage, setErrorMessage] = useState<string | null>(null);
4849
const [encoderDevice, setEncoderDevice] = useState<string>("CPU");
4950

@@ -328,12 +329,7 @@ const DensityTests = () => {
328329
/>
329330
</div>
330331
)}
331-
{videoOutputEnabled && (
332-
<div className="text-muted-foreground">
333-
Note: Select the device that is used in other blocks in your
334-
pipeline.
335-
</div>
336-
)}
332+
{videoOutputEnabled && <SaveOutputWarning />}
337333
</div>
338334

339335
<button
@@ -349,7 +345,7 @@ const DensityTests = () => {
349345
</button>
350346

351347
{jobId && jobStatus && (
352-
<div className="mb-4 p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800">
348+
<div className="m-4 p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800">
353349
<p className="text-sm font-medium text-blue-900 dark:text-blue-100">
354350
Test Status: {jobStatus.state}
355351
</p>
@@ -368,7 +364,7 @@ const DensityTests = () => {
368364
)}
369365

370366
{errorMessage && (
371-
<div className="mb-4 p-3 bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800">
367+
<div className="my-4 p-3 bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800">
372368
<p className="text-sm font-medium text-red-900 dark:text-red-100 mb-2">
373369
Test Failed
374370
</p>
@@ -379,7 +375,7 @@ const DensityTests = () => {
379375
)}
380376

381377
{testResult && (
382-
<div className="mb-4 p-3 bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800">
378+
<div className="my-4 p-3 bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800">
383379
<p className="text-sm font-medium text-green-900 dark:text-green-100 mb-2">
384380
Test Completed Successfully
385381
</p>

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/pages/Home.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const Home = () => {
151151
<div className="flex gap-3">
152152
<BookOpen className="w-6 h-6 text-classic-blue shrink-0" />
153153
<a
154-
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/get-started.html"
154+
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/index.html"
155155
target="_blank"
156156
rel="noopener noreferrer"
157157
className="hover:text-classic-blue transition-colors"
@@ -166,7 +166,7 @@ const Home = () => {
166166
<div className="flex gap-3">
167167
<Sparkles className="w-6 h-6 text-classic-blue shrink-0" />
168168
<a
169-
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/release-notes.html"
169+
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/index.html"
170170
target="_blank"
171171
rel="noopener noreferrer"
172172
className="hover:text-classic-blue transition-colors"

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/pages/Jobs.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Link, useLocation } from "react-router";
22
import {
3-
useGetPerformanceStatusesQuery,
43
useGetDensityStatusesQuery,
54
useGetOptimizationStatusesQuery,
5+
useGetPerformanceStatusesQuery,
66
} from "@/api/api.generated";
77
import {
88
Table,
@@ -14,6 +14,7 @@ import {
1414
} from "@/components/ui/table";
1515
import { format } from "date-fns";
1616
import { PipelineName } from "@/components/shared/PipelineName";
17+
import { formatElapsedTimeMillis } from "@/lib/timeUtils.ts";
1718

1819
const Jobs = () => {
1920
const location = useLocation();
@@ -43,13 +44,6 @@ const Jobs = () => {
4344
{ id: "optimize", label: "Optimize", path: "/jobs/optimize" },
4445
];
4546

46-
const formatElapsedTime = (milliseconds: number) => {
47-
const seconds = milliseconds / 1000;
48-
const mins = Math.floor(seconds / 60);
49-
const secs = Math.floor(seconds % 60);
50-
return `${mins}m ${secs}s`;
51-
};
52-
5347
const formatTimestamp = (timestamp: number) => {
5448
return format(new Date(timestamp), "MMM d, yyyy HH:mm:ss");
5549
};
@@ -154,7 +148,7 @@ const Jobs = () => {
154148
{formatTimestamp(job.start_time)}
155149
</TableCell>
156150
<TableCell>
157-
{formatElapsedTime(job.elapsed_time)}
151+
{formatElapsedTimeMillis(job.elapsed_time)}
158152
</TableCell>
159153
<TableCell>
160154
{job.total_fps !== null
@@ -227,7 +221,7 @@ const Jobs = () => {
227221
{formatTimestamp(job.start_time)}
228222
</TableCell>
229223
<TableCell>
230-
{formatElapsedTime(job.elapsed_time)}
224+
{formatElapsedTimeMillis(job.elapsed_time)}
231225
</TableCell>
232226
<TableCell>
233227
{job.total_fps !== null
@@ -317,7 +311,7 @@ const Jobs = () => {
317311
{formatTimestamp(job.start_time)}
318312
</TableCell>
319313
<TableCell>
320-
{formatElapsedTime(job.elapsed_time)}
314+
{formatElapsedTimeMillis(job.elapsed_time)}
321315
</TableCell>
322316
<TableCell>
323317
{job.total_fps !== null

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/pages/PerformanceTests.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import { Plus, X } from "lucide-react";
1818
import { StreamsSlider } from "@/components/shared/StreamsSlider";
1919
import DeviceSelect from "@/components/shared/DeviceSelect";
20+
import SaveOutputWarning from "@/components/shared/SaveOutputWarning.tsx";
2021

2122
interface PipelineSelection {
2223
pipelineId: string;
@@ -41,7 +42,7 @@ const PerformanceTests = () => {
4142
[key: string]: string[];
4243
} | null;
4344
} | null>(null);
44-
const [videoOutputEnabled, setVideoOutputEnabled] = useState(true);
45+
const [videoOutputEnabled, setVideoOutputEnabled] = useState(false);
4546
const [errorMessage, setErrorMessage] = useState<string | null>(null);
4647
const [encoderDevice, setEncoderDevice] = useState<string>("CPU");
4748

@@ -306,12 +307,7 @@ const PerformanceTests = () => {
306307
/>
307308
</div>
308309
)}
309-
{videoOutputEnabled && (
310-
<div className="text-muted-foreground">
311-
Note: Select the device that is used in other blocks in your
312-
pipeline.
313-
</div>
314-
)}
310+
{videoOutputEnabled && <SaveOutputWarning />}
315311
</div>
316312

317313
<button
@@ -327,7 +323,7 @@ const PerformanceTests = () => {
327323
</button>
328324

329325
{jobId && jobStatus && (
330-
<div className="mb-4 p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800">
326+
<div className="my-4 p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800">
331327
<p className="text-sm font-medium text-blue-900 dark:text-blue-100">
332328
Test Status: {jobStatus.state}
333329
</p>
@@ -346,7 +342,7 @@ const PerformanceTests = () => {
346342
)}
347343

348344
{errorMessage && (
349-
<div className="mb-4 p-3 bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800">
345+
<div className="my-4 p-3 bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800">
350346
<p className="text-sm font-medium text-red-900 dark:text-red-100 mb-2">
351347
Test Failed
352348
</p>
@@ -357,7 +353,7 @@ const PerformanceTests = () => {
357353
)}
358354

359355
{testResult && (
360-
<div className="mb-4 p-3 bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800">
356+
<div className="my-4 p-3 bg-green-50 dark:bg-green-950 border border-green-200 dark:border-green-800">
361357
<p className="text-sm font-medium text-green-900 dark:text-green-100 mb-2">
362358
Test Completed Successfully
363359
</p>

tools/visual-pipeline-and-platform-evaluation-tool/ui/src/pages/Pipelines.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,23 @@ const Pipelines = () => {
625625
/>
626626
)}
627627
</div>
628+
{videoOutputEnabled && (
629+
<div className="text-muted-foreground border border-amber-400 my-2 p-2 bg-amber-200/50 w-[634px]">
630+
<b>Note</b>: The current implementation does not automatically
631+
infer the best encoding device from the existing pipeline. Select
632+
the same device that is already used by other blocks in your
633+
pipeline. To learn more, refer to our documentation:{" "}
634+
<a
635+
href="https://docs.openedgeplatform.intel.com/2025.2/edge-ai-libraries/visual-pipeline-and-platform-evaluation-tool/index.html"
636+
target="_blank"
637+
rel="noopener noreferrer"
638+
className="hover:text-classic-blue transition-colors underline"
639+
>
640+
link
641+
</a>
642+
.
643+
</div>
644+
)}
628645
</div>
629646
</div>
630647
);

0 commit comments

Comments
 (0)