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

Use all dataset ids rather than just the first #3082

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -259,48 +259,48 @@
</template>

<script setup lang="ts">
import { cloneDeep, isEmpty } from 'lodash';
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import { Vue3Lottie } from 'vue3-lottie';
import { VAceEditor } from 'vue3-ace-editor';
import { VAceEditorInstance } from 'vue3-ace-editor/types';
import '@/ace-config';
import Button from 'primevue/button';
import InputText from 'primevue/inputtext';
import Textarea from 'primevue/textarea';
import { cloneDeep, isEmpty } from 'lodash';
import Accordion from 'primevue/accordion';
import AccordionTab from 'primevue/accordiontab';
import DataTable from 'primevue/datatable';
import Button from 'primevue/button';
import Column from 'primevue/column';
import DataTable from 'primevue/datatable';
import InputText from 'primevue/inputtext';
import Textarea from 'primevue/textarea';
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import { VAceEditor } from 'vue3-ace-editor';
import { VAceEditorInstance } from 'vue3-ace-editor/types';
import { Vue3Lottie } from 'vue3-lottie';

import TeraDrilldown from '@/components/drilldown/tera-drilldown.vue';
import TeraDrilldownSection from '@/components/drilldown/tera-drilldown-section.vue';
import LoadingWateringCan from '@/assets/images/lottie-loading-wateringCan.json';
import TeraDrilldownPreview from '@/components/drilldown/tera-drilldown-preview.vue';
import TeraNotebookJupyterInput from '@/components/llm/tera-notebook-jupyter-input.vue';
import TeraDrilldownSection from '@/components/drilldown/tera-drilldown-section.vue';
import TeraDrilldown from '@/components/drilldown/tera-drilldown.vue';
import teraNotebookError from '@/components/drilldown/tera-notebook-error.vue';
import TeraOutputDropdown from '@/components/drilldown/tera-output-dropdown.vue';
import TeraNotebookJupyterInput from '@/components/llm/tera-notebook-jupyter-input.vue';
import TeraModelDiagram from '@/components/model/petrinet/model-diagrams/tera-model-diagram.vue';
import LoadingWateringCan from '@/assets/images/lottie-loading-wateringCan.json';
import TeraModelSemanticTables from '@/components/model/petrinet/tera-model-semantic-tables.vue';
import TeraOperatorAnnotation from '@/components/operator/tera-operator-annotation.vue';
import teraNotebookError from '@/components/drilldown/tera-notebook-error.vue';

import { getModel, getModelConfigurations, getModelType, getMMT } from '@/services/model';
import { createModelConfiguration } from '@/services/model-configurations';
import { TaskStatus } from '@/types/Types';
import { AMRSchemaNames } from '@/types/common';
import { useToastService } from '@/services/toast';
import { logger } from '@/utils/logger';
import { configureModelFromDatasets, configureModelFromDocument } from '@/services/goLLM';
import { KernelSessionManager } from '@/services/jupyter';
import { FatalError } from '@/api/api';
import { formatTimestamp } from '@/utils/date';
import TeraInitialTable from '@/components/model/petrinet/tera-initial-table.vue';
import TeraParameterTable from '@/components/model/petrinet/tera-parameter-table.vue';
import { emptyMiraModel } from '@/model-representation/mira/mira';
import type { Initial, Model, ModelConfiguration, ModelParameter } from '@/types/Types';
import type { MiraModel, MiraTemplateParams } from '@/model-representation/mira/mira-common';
import { configureModelFromDatasets, configureModelFromDocument } from '@/services/goLLM';
import { KernelSessionManager } from '@/services/jupyter';
import { getMMT, getModel, getModelConfigurations, getModelType } from '@/services/model';
import { createModelConfiguration } from '@/services/model-configurations';
import { useToastService } from '@/services/toast';
import type { Initial, Model, ModelConfiguration, ModelParameter } from '@/types/Types';
import { TaskStatus } from '@/types/Types';
import { AMRSchemaNames } from '@/types/common';
import type { WorkflowNode } from '@/types/workflow';
import TeraParameterTable from '@/components/model/petrinet/tera-parameter-table.vue';
import TeraInitialTable from '@/components/model/petrinet/tera-initial-table.vue';
import { OperatorStatus } from '@/types/workflow';
import { formatTimestamp } from '@/utils/date';
import { logger } from '@/utils/logger';
import { ModelConfigOperation, ModelConfigOperationState } from './model-config-operation';

enum ConfigTabs {
Expand Down Expand Up @@ -478,10 +478,10 @@ const extractConfigurationsFromInputs = async () => {
}
);
}
if (datasetId.value) {
if (datasetIds.value) {
modelFromDatasetHandler.value = await configureModelFromDatasets(
model.value.id,
[datasetId.value],
datasetIds.value,
{
ondata(data, closeConnection) {
if (data?.status === TaskStatus.Failed) {
Expand Down Expand Up @@ -524,7 +524,7 @@ const selectedConfigId = computed(
);

const documentId = computed(() => props.node.inputs?.[1]?.value?.[0]?.documentId);
const datasetId = computed(() => props.node.inputs?.[2]?.value?.[0]);
const datasetIds = computed(() => props.node.inputs?.[2]?.value);

const suggestedConfirgurationContext = ref<{
isOpen: boolean;
Expand Down
Loading