From c7a9f97d8e8c3c43361dec0377e3697eba5dc3f4 Mon Sep 17 00:00:00 2001 From: Jake Wagoner Date: Mon, 15 Apr 2024 14:47:29 -0600 Subject: [PATCH] Augmentation Pagination and General Error handling (#370) * Add aug pagination and error handling for deepssm_error * Add white space to EOF * Update error handling for deepSSMResult.value * Update constant name * Add `-P threads` to the prod celery startup script --------- Co-authored-by: Anne Haley --- dev/prod.celery.start.sh | 2 +- .../src/components/DeepSSM/DeepSSMTab.vue | 6 ++-- .../src/components/RenderControls.vue | 34 +++++++++++++++++++ .../src/components/ShapeViewer/methods.js | 29 +++++++++------- web/shapeworks/src/store/constants.ts | 2 ++ web/shapeworks/src/store/index.ts | 2 ++ web/shapeworks/src/store/methods.ts | 2 -- web/shapeworks/src/views/Main.vue | 8 +++-- 8 files changed, 65 insertions(+), 20 deletions(-) diff --git a/dev/prod.celery.start.sh b/dev/prod.celery.start.sh index 61382db7..33948872 100644 --- a/dev/prod.celery.start.sh +++ b/dev/prod.celery.start.sh @@ -5,4 +5,4 @@ cd ~/celery_project for keyval in $(cat .env | sed -e 's/: /=/g' -e "s/'\|,\|{\|}//g" -e 's/", "/ /g' -e 's/"}//g' ); do export $keyval; done conda activate shapeworks -celery -A shapeworks_cloud.celery worker -n "w1@${HOSTNAME}" -Q gpu --logfile=celery-logs +celery -A shapeworks_cloud.celery worker -n "w1@${HOSTNAME}" -Q gpu -P threads --logfile=celery-logs diff --git a/web/shapeworks/src/components/DeepSSM/DeepSSMTab.vue b/web/shapeworks/src/components/DeepSSM/DeepSSMTab.vue index 142e830a..e9c65c8f 100644 --- a/web/shapeworks/src/components/DeepSSM/DeepSSMTab.vue +++ b/web/shapeworks/src/components/DeepSSM/DeepSSMTab.vue @@ -128,9 +128,11 @@ export default { onMounted(async () => { if (!deepSSMResult.value && selectedProject.value) { + deepSSMLoadingData.value = true; await loadDeepSSMDataForProject(); + deepSSMLoadingData.value = false; } - if (deepSSMResult.value) { + if (deepSSMResult.value && deepSSMResult.value.result) { try { Promise.all([ await getCSVDataFromURL(deepSSMResult.value.result.aug_total_data), @@ -311,7 +313,7 @@ export default { Run DeepSSM tasks - + Data diff --git a/web/shapeworks/src/components/RenderControls.vue b/web/shapeworks/src/components/RenderControls.vue index 8e540b8f..723555cf 100644 --- a/web/shapeworks/src/components/RenderControls.vue +++ b/web/shapeworks/src/components/RenderControls.vue @@ -1,6 +1,7 @@