-
+
Run a pipeline on multiple datasets
- Choose a pipeline to run, then select datasets.
+
+ Choose a pipeline to run, then select datasets.
+
-
+
Choose a VIAME pipeline
-
+
{
-
- Datasets staged for selected pipeline
-
-
-
- mdi-minus
-
-
-
- {{ computeOutputDatasetName(item) }}
-
-
-
-
-
-
-
- Run pipeline for ({{ stagedDatasets.length }}) Datasets
-
-
-
-
-
+
+
Available datasets
- These datasets are compatible with the chosen pipeline.
-
-
-
-
-
-
-
-
- mdi-check-all
-
- Select all
-
-
-
+
+ Add the datasets to run the pipeline on. Measurement pipelines list stereo datasets only.
+
+
+
+
+
+ Selected datasets
+
-
+
- mdi-plus
+ mdi-minus
+
+ {{ computeOutputDatasetName(item) }}
+
+
+
+
+
+ Run pipeline for ({{ stagedDatasets.length }}) Datasets
+
+
+
diff --git a/client/platform/desktop/frontend/components/MultiTrainingMenu.vue b/client/platform/desktop/frontend/components/MultiTrainingMenu.vue
index cf38b2cac..42abf18ee 100644
--- a/client/platform/desktop/frontend/components/MultiTrainingMenu.vue
+++ b/client/platform/desktop/frontend/components/MultiTrainingMenu.vue
@@ -12,11 +12,12 @@ import {
watch,
} from 'vue';
import {
- DatasetConfig, Pipelines, TrainingConfigs, useApi, Pipe,
+ Pipelines, TrainingConfigs, useApi, Pipe,
} from 'dive-common/apispec';
import { usePrompt } from 'dive-common/vue-utilities/prompt-service';
import { itemsPerPageOptions, simplifyTrainingName } from 'dive-common/constants';
import { clientSettings } from 'dive-common/store/settings';
+import DatasetPicker from 'dive-common/components/DatasetPicker.vue';
import { useRoute, useRouter } from 'vue-router/composables';
import { DesktopJob, RunTraining } from 'platform/desktop/constants';
@@ -31,6 +32,7 @@ function joinPath(dir: string, filename: string) {
}
export default defineComponent({
+ components: { DatasetPicker },
setup() {
const {
runTraining, getPipelineList, deleteTrainedPipeline, getTrainingConfigurations, exportTrainedPipeline,
@@ -128,7 +130,7 @@ export default defineComponent({
];
const data = reactive({
- stagedItems: {} as Record
,
+ stagedItems: {} as Record,
trainingOutputName: '',
selectedTrainingConfig: 'foo.whatever',
fineTuneTraining: false,
@@ -186,7 +188,7 @@ export default defineComponent({
return [];
});
- function toggleStaged(meta: DatasetConfig) {
+ function toggleStaged(meta: JsonConfigCache) {
if (data.stagedItems[meta.id]) {
del(data.stagedItems, meta.id);
} else {
@@ -194,16 +196,24 @@ export default defineComponent({
}
}
const availableItems = computed(() => Object.values(datasets.value)
- .filter((item) => item.subType === null)
- .map((item) => ({
- ...item,
- included: item.id in data.stagedItems,
- })));
+ .filter((item) => item.subType === null));
const stagedItems = computed(() => Object.values(data.stagedItems));
- function getAvailableItemClass({ included }: JsonConfigCache & { included: boolean }) {
- return included ? 'disabled-row' : '';
+ const stagedIds = computed(() => Object.keys(data.stagedItems));
+
+ /** Stage the picked datasets that are not staged yet. */
+ function stageIds(ids: string[]) {
+ ids.forEach((id) => {
+ const meta = datasets.value[id];
+ if (meta && !data.stagedItems[id]) toggleStaged(meta);
+ });
+ }
+
+ function unstageIds(ids: string[]) {
+ ids.forEach((id) => {
+ if (data.stagedItems[id]) toggleStaged(data.stagedItems[id]);
+ });
}
const isReadyToTrain = computed(() => (
@@ -343,7 +353,9 @@ export default defineComponent({
labelFile,
clearLabelText,
toggleStaged,
- getAvailableItemClass,
+ stagedIds,
+ stageIds,
+ unstageIds,
deleteModel,
exportModel,
simplifyTrainingName,
@@ -375,17 +387,7 @@ export default defineComponent({
},
available: {
items: availableItems,
- headers: headersTmpl.concat({
- text: 'View',
- value: 'view',
- sortable: false,
- width: 80,
- }, {
- text: 'Include',
- value: 'action',
- sortable: false,
- width: 80,
- }),
+ headers: headersTmpl,
},
staged: {
items: stagedItems,
@@ -404,11 +406,11 @@ export default defineComponent({