From 154e218c7aa36f545f113f08ea9a2b1863706aca Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:14:36 -0400 Subject: [PATCH 1/8] Update config_dbs.json --- code/config_dbs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/code/config_dbs.json b/code/config_dbs.json index bc49f3ecc..f2c6c6e92 100644 --- a/code/config_dbs.json +++ b/code/config_dbs.json @@ -13,6 +13,7 @@ "log_model": "/translator/data/orangeboard/databases/KG2.7.6/LogModel_v1.0_KG2.7.6.pkl", "rel_max": "/translator/data/orangeboard/databases/KG2.7.6/rel_max_v1.0_KG2.7.6.emb.gz", "map_txt": "/translator/data/orangeboard/databases/KG2.7.6/map_v1.0_KG2.7.6.txt", + "test_txt": "/translator/data/orangeboard/databases/KG2.7.6/test_v1.0_KG2.7.6.txt", "xcrg_embeddings": "/translator/data/orangeboard/databases/KG2.8.0.1/chemical_gene_embeddings_v1.0.KG2.8.0.1.npz", "xcrg_increase_model": "/translator/data/orangeboard/databases/KG2.8.0.1/xcrg_increase_model_v1.0.KG2.8.0.1.pt", "xcrg_decrease_model": "/translator/data/orangeboard/databases/KG2.8.0.1/xcrg_decrease_model_v1.0.KG2.8.0.1.pt" From 86eed9bf1663249f519c6a676e6f22a5232c33c4 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:36:24 -0400 Subject: [PATCH 2/8] Update config_dbs.json --- code/config_dbs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/code/config_dbs.json b/code/config_dbs.json index f2c6c6e92..bc49f3ecc 100644 --- a/code/config_dbs.json +++ b/code/config_dbs.json @@ -13,7 +13,6 @@ "log_model": "/translator/data/orangeboard/databases/KG2.7.6/LogModel_v1.0_KG2.7.6.pkl", "rel_max": "/translator/data/orangeboard/databases/KG2.7.6/rel_max_v1.0_KG2.7.6.emb.gz", "map_txt": "/translator/data/orangeboard/databases/KG2.7.6/map_v1.0_KG2.7.6.txt", - "test_txt": "/translator/data/orangeboard/databases/KG2.7.6/test_v1.0_KG2.7.6.txt", "xcrg_embeddings": "/translator/data/orangeboard/databases/KG2.8.0.1/chemical_gene_embeddings_v1.0.KG2.8.0.1.npz", "xcrg_increase_model": "/translator/data/orangeboard/databases/KG2.8.0.1/xcrg_increase_model_v1.0.KG2.8.0.1.pt", "xcrg_decrease_model": "/translator/data/orangeboard/databases/KG2.8.0.1/xcrg_decrease_model_v1.0.KG2.8.0.1.pt" From eb304016af22df689ef9dc6598af0caae0fe3cb2 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Mon, 11 Sep 2023 11:03:15 -0400 Subject: [PATCH 3/8] fix: compared the downloaded file with the original file --- deploy/kg2/scripts/download_database.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deploy/kg2/scripts/download_database.sh b/deploy/kg2/scripts/download_database.sh index 820c19942..5b1fafbef 100755 --- a/deploy/kg2/scripts/download_database.sh +++ b/deploy/kg2/scripts/download_database.sh @@ -124,6 +124,18 @@ do printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' + + file1="$sftp_url${temp/.md5/}" + file2="${file2download/$sftp_url/}" + if cmp -s "$file1" "$file2"; then + printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" + else + printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" + printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" + sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath + printf '\n' + fi + fi done From 30f7f3ed3bb97c384c0ad8048a607e496dcd0045 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Mon, 11 Sep 2023 11:06:06 -0400 Subject: [PATCH 4/8] fix: compared the downloaded file with the original file --- deploy/arax/scripts/download_database.sh | 14 +++++++++++++- deploy/kg2/scripts/download_database.sh | 14 +------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index a616f9bd4..5b1fafbef 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -27,7 +27,7 @@ echo " ################################################################################ # # # # - # ARAX Database Download Utility # + # KG2 Database Download Utility # # # # # ################################################################################" @@ -124,6 +124,18 @@ do printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' + + file1="$sftp_url${temp/.md5/}" + file2="${file2download/$sftp_url/}" + if cmp -s "$file1" "$file2"; then + printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" + else + printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" + printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" + sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath + printf '\n' + fi + fi done diff --git a/deploy/kg2/scripts/download_database.sh b/deploy/kg2/scripts/download_database.sh index 5b1fafbef..b6ccaddc5 100755 --- a/deploy/kg2/scripts/download_database.sh +++ b/deploy/kg2/scripts/download_database.sh @@ -124,22 +124,10 @@ do printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' - - file1="$sftp_url${temp/.md5/}" - file2="${file2download/$sftp_url/}" - if cmp -s "$file1" "$file2"; then - printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" - else - printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" - printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" - sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath - printf '\n' - fi - fi done # rename new MD5 to local printf 'renaming "%s" to "%s"...\n' $md5_sums_new $md5_sums_local rm -rf $md5_sums_local -mv $md5_sums_new $md5_sums_local +mv $md5_sums_new $md5_sums_local \ No newline at end of file From 92aa9b467bf6f2ab6fbb9dfcc60e0eecaa380fc1 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Thu, 14 Sep 2023 08:43:41 -0400 Subject: [PATCH 5/8] the repeaated download step is added --- deploy/arax/scripts/download_database.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index 5b1fafbef..f340df68a 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -125,9 +125,10 @@ do sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' - file1="$sftp_url${temp/.md5/}" - file2="${file2download/$sftp_url/}" - if cmp -s "$file1" "$file2"; then + # comparing the downloaded file with the original file and retry if there are not the same + #file1="$sftp_url${temp/.md5/}" + #file2="${file2download/$sftp_url/}" + if cmp -s "$file2download" "$file2download_localpath"; then printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" else printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" From d586a6bb0068018c46dd8593714dddc8c5d33838 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Thu, 14 Sep 2023 09:33:30 -0400 Subject: [PATCH 6/8] the downaload fail wording added --- deploy/arax/scripts/download_database.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index f340df68a..e7bb39fad 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -131,7 +131,7 @@ do if cmp -s "$file2download" "$file2download_localpath"; then printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" else - printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" + printf 'Download has failed and the file "%s" is different from "%s"\n' "$file1" "$file2" printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' From 67326c6cbfb17afa9894b7ab630866daef33e0e7 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Thu, 14 Sep 2023 10:00:53 -0400 Subject: [PATCH 7/8] the downaload fail wording added --- deploy/arax/scripts/download_database.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index e7bb39fad..ff63b4d49 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -131,8 +131,9 @@ do if cmp -s "$file2download" "$file2download_localpath"; then printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" else - printf 'Download has failed and the file "%s" is different from "%s"\n' "$file1" "$file2" - printf 'Downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" + printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" + printf 'The 1st download failed' + printf 'The 2nd try, downloading from "%s" to "%s"...\n' "$file2download" "$file2download_localpath" sftp -i $sftp_key -o StrictHostKeyChecking=no -p $file2download $file2download_localpath printf '\n' fi From c049b98b76546312e3645cea4bde848f78eda79e Mon Sep 17 00:00:00 2001 From: Chunyu Ma Date: Thu, 14 Sep 2023 18:51:39 -0400 Subject: [PATCH 8/8] add sqlitedict to requirements.txt #2125 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index ff6b5c933..13de62f20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,3 +38,4 @@ pronto==2.5.3 pygit2==1.10.0 tabulate==0.9.0 urllib3==1.26.16 +sqlitedict