/examples/4forums/Makefile
Makefile | 64 lines | 57 code | 7 blank | 0 comment | 0 complexity | 74ca8d60bf15b053b6ad20229d2e158a MD5 | raw file
- GPUINDEX = 0
- RAND_INFER = true
- AD3 = false
- BERT_EMB = true
- ISSUE = abortion
- AUTHOR_CON = false
- LOCAL_INIT = true
- TARGET = 4forums
- DIRECTORY = data/
- FE_DIR = .
- NET_DIR = .
- SAVE_DIR = trained-models/
- PRET_BERT = bert_fixed/
- WE_FILE = /homes/mwidmose/scratch/GloVe/glove.840B.300d.txt
- ifeq ($(RAND_INFER), true)
- INFERENCE = --randomized
- else
- INFERENCE =
- endif
- ifeq ($(AUTHOR_CON), true)
- AC = --author_constraints
- else
- AC =
- endif
- ifeq ($(LOCAL_INIT), true)
- LOCAL_OPT_INIT = --local_init
- else
- LOCAL_OPT_INIT =
- endif
- ifeq ($(BERT_EMB), true)
- BERT = --bert
- RULES = rule.dr
- CONFIG = config_bert.json
- L_RATE = 0.00002
- PICKLE_D = pickled_abortion/
- else
- BERT = --wordembed
- RULES = rule_lstm.dr
- CONFIG = config.json
- L_RATE = 0.05
- PICKLE_D = pickled_abortion_lstm/
- endif
- ifeq ($(AD3), true)
- ADDD = --ad3
- else
- ADDD =
- endif
- local:
- 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)
- global:
- 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)
- global-hotstart:
- rm -r $(SAVE_DIR)
- cp -r $(PRET_BERT) $(SAVE_DIR)
- 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)
- global-debug-cpu:
- 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)