@@ -22,6 +33,17 @@
Complete
+
+
+ Failed
+
+
+
+ {{ item.error_msg }}
+
+
Failed
+
+
@@ -50,6 +72,10 @@
Confirm complete metrics report deletion. To regenerate the report reselect the projects on the
home screen and select metrics.
+
+ Confirm failed metrics report deletion. To regenerate the report reselect the projects on the
+ home screen and select metrics.
+
@@ -116,6 +142,10 @@ export default {
})
},
loadMetrics (_, { item }) {
+ // Don't navigate if the report has failed
+ if (item.status === 'Failed') {
+ return
+ }
this.$router.push({
name: 'metrics',
params: {
@@ -123,6 +153,13 @@ export default {
}
})
},
+ getRowProps (data) {
+ // Apply disabled-row class to failed reports
+ if (data.item.status === 'Failed') {
+ return { class: 'disabled-row' }
+ }
+ return { class: '' }
+ },
confRemoval () {
const item = this.confDeleteReportModal
this.$http.delete(`/api/metrics-job/${this.confDeleteReportModal.report_id}/`).then(_ => {
@@ -166,8 +203,35 @@ export default {
padding-left: 3px;
}
+.status-icon.error {
+ color: $danger;
+}
+
+:deep(.v-table > .v-table__wrapper > table > tbody > tr.disabled-row) {
+ pointer-events: none;
+ opacity: 0.6;
+ cursor: not-allowed !important;
+}
+
+:deep(.v-table > .v-table__wrapper > table > tbody > tr.disabled-row:hover) {
+ background-color: inherit !important;
+}
+
+:deep(.v-table > .v-table__wrapper > table > tbody > tr.disabled-row > td) {
+ pointer-events: none;
+}
+
+:deep(.v-table > .v-table__wrapper > table > tbody > tr.disabled-row > td > div) {
+ pointer-events: auto;
+}
+
+:deep(.v-table > .v-table__wrapper > table > tbody > tr.disabled-row .failed-row-tooltip-trigger) {
+ pointer-events: auto;
+ cursor: help;
+}
+
.project-links {
- color: #005EB8;
+ color: $primary-alt;
&:hover {
color: #fff;
diff --git a/v1/medcat/medcat/utils/meta_cat/data_utils.py b/v1/medcat/medcat/utils/meta_cat/data_utils.py
index 9272d1a2d..e3a0e054d 100644
--- a/v1/medcat/medcat/utils/meta_cat/data_utils.py
+++ b/v1/medcat/medcat/utils/meta_cat/data_utils.py
@@ -193,9 +193,11 @@ def find_alternate_classname(category_value2id: Dict, category_values: Set, alte
failed_to_find = True
if failed_to_find:
raise Exception("The classes set in the config are not the same as the one found in the data. "
- "The classes present in the config vs the ones found in the data - "
- f"{set(category_value2id.keys())}, {category_values}. Additionally, ensure the "
- "populate the 'alternative_class_names' attribute to accommodate for variations.")
+ f"The classes present in the config: {set(category_value2id.keys())} vs "
+ f"the ones found in the data: {category_values}. Additionally, ensure to "
+ "populate the 'alternative_class_names' attribute to accommodate for variations. "
+ " This also could be due to the data not including enough examples of a given class"
+ " after train / test splitting.")
category_value2id = copy.deepcopy(updated_category_value2id)
logger.info("Updated categoryvalue2id mapping - %s", category_value2id)
return category_value2id