PageRenderTime 36ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/examples/4forums/Makefile

https://gitlab.com/purdueNlp/DRaiL
Makefile | 64 lines | 57 code | 7 blank | 0 comment | 0 complexity | 74ca8d60bf15b053b6ad20229d2e158a MD5 | raw file
  1. GPUINDEX = 0
  2. RAND_INFER = true
  3. AD3 = false
  4. BERT_EMB = true
  5. ISSUE = abortion
  6. AUTHOR_CON = false
  7. LOCAL_INIT = true
  8. TARGET = 4forums
  9. DIRECTORY = data/
  10. FE_DIR = .
  11. NET_DIR = .
  12. SAVE_DIR = trained-models/
  13. PRET_BERT = bert_fixed/
  14. WE_FILE = /homes/mwidmose/scratch/GloVe/glove.840B.300d.txt
  15. ifeq ($(RAND_INFER), true)
  16. INFERENCE = --randomized
  17. else
  18. INFERENCE =
  19. endif
  20. ifeq ($(AUTHOR_CON), true)
  21. AC = --author_constraints
  22. else
  23. AC =
  24. endif
  25. ifeq ($(LOCAL_INIT), true)
  26. LOCAL_OPT_INIT = --local_init
  27. else
  28. LOCAL_OPT_INIT =
  29. endif
  30. ifeq ($(BERT_EMB), true)
  31. BERT = --bert
  32. RULES = rule.dr
  33. CONFIG = config_bert.json
  34. L_RATE = 0.00002
  35. PICKLE_D = pickled_abortion/
  36. else
  37. BERT = --wordembed
  38. RULES = rule_lstm.dr
  39. CONFIG = config.json
  40. L_RATE = 0.05
  41. PICKLE_D = pickled_abortion_lstm/
  42. endif
  43. ifeq ($(AD3), true)
  44. ADDD = --ad3
  45. else
  46. ADDD =
  47. endif
  48. local:
  49. python ../../run_debates_4forums.py -d $(DIRECTORY) -r $(RULES) -c $(CONFIG) -f $(FE_DIR) -n $(NET_DIR) --savedir $(SAVE_DIR) --issue $(ISSUE) -p $(PICKLE_D) $(BERT) $(INFERENCE) -m local --constraints --train_only -g $(GPUINDEX) $(ADDD)
  50. global:
  51. python ../../run_debates_4forums.py -d $(DIRECTORY) -r $(RULES) -c $(CONFIG) -f $(FE_DIR) -n $(NET_DIR) --savedir $(SAVE_DIR) --issue $(ISSUE) -p $(PICKLE_D) $(BERT) $(INFERENCE) -m global --lrate $(L_RATE) --constraints -g $(GPUINDEX) $(ADDD) --logging_config ../../logging_conf.json --we_file $(WE_FILE) --loss hinge $(AC) $(LOCAL_OPT_INIT)
  52. global-hotstart:
  53. rm -r $(SAVE_DIR)
  54. cp -r $(PRET_BERT) $(SAVE_DIR)
  55. python ../../run_debates_4forums.py -d $(DIRECTORY) -r $(RULES) -c $(CONFIG) -f $(FE_DIR) -n $(NET_DIR) --savedir $(SAVE_DIR) --issue $(ISSUE) -p $(PICKLE_D) $(BERT) $(INFERENCE) -m global --lrate $(L_RATE) --constraints --continue_from_checkpoint -g $(GPUINDEX) $(ADDD) --logging_config ../../logging_conf.json --we_file $(WE_FILE) --loss hinge $(AC) $(LOCAL_OPT_INIT)
  56. global-debug-cpu:
  57. python ../../run_debates_4forums.py -d $(DIRECTORY) -r $(RULES) -c $(CONFIG) -f $(FE_DIR) -n $(NET_DIR) --savedir $(SAVE_DIR) --issue $(ISSUE) $(BERT) $(INFERENCE) -m global --lrate $(L_RATE) --constraints --debug $(ADDD) --logging_config ../../logging_conf.json --we_file $(WE_FILE) --loss hinge $(AC) $(LOCAL_OPT_INIT)