SHARE
TWEET

Untitled

a guest Jul 18th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. server='/local/datdb'
  3.  
  4. ## use cosine similarity as objective function
  5. def_emb_dim='300'
  6. metric_option='cosine'
  7.  
  8. work_dir=$server/'goAndGeneAnnotationMar2017'
  9. bert_model=$work_dir/'BERT_base_cased_tune_go_branch/fine_tune_lm_bioBERT' # use the full mask + nextSentence to innit
  10. data_dir=$server/'goAndGeneAnnotationMar2017/entailment_data/AicScore/go_bert_cls'
  11. pregenerated_data=$server/'goAndGeneAnnotationMar2017/BERT_base_cased_tune_go_branch' # use the data of full mask + nextSentence to innit
  12. bert_output_dir=$pregenerated_data/'fine_tune_lm_bioBERT'
  13. mkdir $bert_output_dir
  14.  
  15. result_folder=$bert_output_dir/$metric_option'.768.reduce300ClsVec' #$def_emb_dim.'clsVec'
  16. mkdir $result_folder
  17.  
  18. model_load=$result_folder/'best_state_dict.pytorch'
  19.  
  20. conda activate tensorflow_gpuenv
  21. cd $server/GOmultitask
  22.  
  23. pair='HumanFly' # 'HumanMouse'
  24. outDir=$server/'geneOrtholog'/$pair'Score/qnliFormatData17'
  25. mkdir $outDir
  26. finalDir=$outDir/$metric_option'.768.reduce300ClsVec'
  27. mkdir $finalDir
  28.  
  29.  
  30. for point in {0..10800..300} # 12600
  31. do
  32.  
  33. echo ' '
  34. echo 'iter '$point
  35.  
  36. savePickle=$outDir/'GeneDict2test.'$point'.pickle'
  37.  
  38. saveDf=$outDir/'Ortholog2testDef.'$point'.txt'
  39. test_file=$saveDf
  40. write_score=$finalDir/'Ortholog2testDef.'$point'.score.txt'
  41.  
  42.  
  43. ## set epoch=0 for testing
  44. CUDA_VISIBLE_DEVICES=5 python3 $server/GOmultitask/BERT/encoder/do_model.py --main_dir $work_dir --qnli_dir $data_dir --batch_size_label 64 --batch_size_bert 8 --bert_model $bert_model --pregenerated_data $pregenerated_data --bert_output_dir $bert_output_dir --result_folder $result_folder --epoch 0 --num_train_epochs_entailment 0 --use_cuda --metric_option $metric_option --def_emb_dim $def_emb_dim --reduce_cls_vec --model_load $model_load --write_score $write_score --test_file $test_file > $result_folder/test1.log
  45.  
  46. paste $test_file $write_score > $finalDir/'score.'$point'.txt' ## append columns
  47.  
  48. # rm -f $test_file
  49. rm -f $write_score
  50.  
  51. done
  52.  
  53.  
  54. ##
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top