Skip to content

Commit

Permalink
Merge branch 'main' into dataset-statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis committed Dec 20, 2024
2 parents 3384501 + 5e91099 commit 2b8dc16
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ watch(
// Create an observer to re-render the graph when it resizes
let graphResizeObserver: ResizeObserver;
onMounted(() => {
if (graphElement.value) {
if (graphElement.value && props.featureConfig?.isPreview === false) {
// FIXME: This debounce prevents the graph from being rendered multiple times in a row.
// This happens in cases where there is a slight change in width when a scrollbar is shown or hidden. eg. opening/closing the transitions accordion in the model page
graphResizeObserver = observeElementSizeChange(graphElement.value, debounce(renderGraph, 2000));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const options = ref([
label: 'Add a note',
command: () => emit('show-annotation-editor')
},
{
icon: 'pi pi-external-link',
label: 'Open in new window',
command: () => emit('open-in-new-window')
},
// {
// icon: 'pi pi-external-link',
// label: 'Open in new window',
// command: () => emit('open-in-new-window')
// },
{ icon: 'pi pi-trash', label: 'Remove', command: () => emit('remove-operator') }
]);
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
/>
<span class="flex gap-2">
<tera-pyciemss-cancel-button class="mr-auto" :simulation-run-id="cancelRunId" />
<Button label="Run" icon="pi pi-play" @click="runCalibrate" :disabled="disableRunButton" />
<div v-tooltip="runButtonMessage">
<Button label="Run" icon="pi pi-play" @click="runCalibrate" :disabled="isRunDisabled" />
</div>
</span>
</div>

Expand Down Expand Up @@ -700,13 +702,24 @@ const resetState = () => {
});
};
const disableRunButton = computed(
() =>
!currentDatasetFileName.value ||
!csvAsset.value ||
!modelConfigId.value ||
!datasetId.value ||
knobs.value.timestampColName === ''
// Checks for disabling run button:
const isMappingfilled = computed(
() => mapping.value.find((ele) => ele.datasetVariable && ele.modelVariable) && knobs.value.timestampColName
);
const areNodeInputsFilled = computed(() => datasetId.value && modelConfigId.value);
const isRunDisabled = computed(() => !isMappingfilled.value || !areNodeInputsFilled.value);
const mappingFilledTooltip = computed(() =>
!isMappingfilled.value ? 'Must contain a Timestamp column and at least one filled in mapping. \n' : ''
);
const nodeInputsFilledTooltip = computed(() =>
!areNodeInputsFilled.value ? 'Must a valid dataset and model configuration\n' : ''
);
const runButtonMessage = computed(() =>
isRunDisabled.value ? `${mappingFilledTooltip.value} ${nodeInputsFilledTooltip.value}` : ''
);
const selectedOutputId = ref<string>();
Expand Down
2 changes: 1 addition & 1 deletion packages/mira/mira-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
928de3e9ef17594eb78d3d42c00d90ed0d7803a6
f302c6c88ca7c14f94ca9801f32c4d9da2dbd17c
31 changes: 22 additions & 9 deletions testing/manual/compare-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,56 @@ Report any issues into GitHub: [open an issue](https://github.com/DARPA-ASKEM/te
4. Attach the Bertozzi2020, Fang2020, and Tang2020 models to the "Compare models" operator
5. Open the compare models drilldown
6. Ensure that when the drill-down starts:
- The overview begins to generate
- The model graphs are displayed
7. When the overview is generated, it should compare the structure of the AMR models.
- There is a "Concept context comparison" section
- There is a "Tabular context comparison" section
- There is a "Concept graph comparison" section
7. Click on the "Compare" button. When the overview is generated, it should compare the structure of the AMR models.
- It should have a title that states it is comparing all 3 models
- It should have a summary of the comparison
- It should only compare the structure of the models
- It should have detailed comparisons of the structure of the models
- It should have vague comparisons of the metadata of the models
8. Add a goal of comparison such as "which model is best to simulate covid spread in Canada" and click on the compare button
- The summary should now address the goal and make a recommendation
### 3. Compare models with partial model cards
### 4. Compare models with partial model cards
1. Enrich the Bertozzi2020 and Fang2020 models with their respective documents
2. Re-open the "Compare models" operator
3. Open the drilldown
4. Ensure that when the drill-down starts:
- The overview begins to generate
- The summary regenerates automatically
- The model graphs are displayed
- Model card information is displayed for Bertozzi2020 and Fang2020
5. When the overview is generated, it should compare both the structure of the AMR models and the metadata information.
- There is a "Concept context comparison" section
- There is a "Tabular context comparison" section
- There is a "Concept graph comparison" section
6. Clear the goal and click on the "Compare" button. When the overview is generated, it should compare both the structure of the AMR models and the metadata information.
- It should have a title that states it is comparing all 3 models
- It should have a summary of the comparison
- It should compare the structure of ALL the models
- It should compare the metadata information for Bertozzi2020 and Fang2020 only
7. Add a goal of comparison and click on the compare button
- The summary should address the goal and make a recommendation
### 4. Compare models all with model cards
### 5. Compare models all with model cards
1. Finally, enrich the Tang2020 models with its respective document
2. Re-open the "Compare models" operator
3. Open the drilldown
4. Ensure that when the drill-down starts:
- The summary regenerates automatically
- The overview begins to generate
- The model graphs are displayed
- Model card information is displayed for all models
5. When the overview is generated, it should only compare the metadata information from each model and not look at the structure.
6. Clear the goal and click on the "Compare" button. When the overview is generated, it should only compare the metadata information from each model and not look at the structure.
- It should have a title that states it is comparing all 3 models
- It should have a summary of the comparison
- It should compare the structure of ALL the models
- It should compare the metadata information for ALL the models
7. Add a goal of comparison and click on the compare button
- The summary should address the goal and make a recommendation
### 5. Working with the Compare models drilldown: NOTEBOOK
### 6. Working with the Compare models drilldown: NOTEBOOK
1. Switch to the **Notebook** tab.
2. Type "Compare models" into the AI assistant and press the **Send** icon (or enter)
3. It should generate some Python code.
Expand Down
13 changes: 4 additions & 9 deletions testing/manual/intervention-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,14 @@ Report any issues into GitHub: [open an issue](https://github.com/DARPA-ASKEM/te
1. Click `+ Add intervention`
2. Name it `Dynamic State` and change it to _Dynamic_.
3. Set State `I` to `100` when `S` crosses the threshold of `800`.
### 9. Save the intervention policy
1. Save the intervention policy
2. Check the preview of the intervention policy
1. Does the AI assisted _description_ match the criteria?
2. Are the _criteria_ visible in the chart?
4. Save the intervention policy
### 10. Create a New intervention policy
### 9. Create a New intervention policy
1. Click 'Create New' button. You should see a blank intervention card.
2. Click 'Save' or 'Save As' without filling any of the details. (Currently that is not allowed so you should see a msg that the save failed.)
3. Select the intervention policy created in step 9.
3. Select the intervention policy created in step 8.
### 11. Simulate with the intervention policy
### 10. Simulate with the intervention policy
1. Add the operator `Configure model` to the workflow
2. Connect the model to the operator
3. Add the operator `Simulate` to the workflow
Expand Down

0 comments on commit 2b8dc16

Please sign in to comment.