<filename>main.py
import os
import argparse
from gpt.src.concat_fine_tuning import concat_finetuning, domain_combined
from gpt.src.hierarchical_attention import HA
from gpt.src.simple_finetune import simple_finetune, ensemble_test, simple_finetune_output


def run_simple_finetune_and_emsemble_decoding(domain):
    simple_finetune(domain=domain, methods='ori')
    simple_finetune(domain=domain, methods='rule')
    ensemble_test(domain=domain)


def run_concat_finetune(domain):
    concat_finetuning(domain=domain)

def run_ha(domain):
    HA(domain=domain)

def run_all(args):
#    simple_finetune(domain=args.domain, methods='ori',
#                    source='source',target='target')
    simple_finetune_output(in_domain=args.domain, out_domain=args.domain, 
                           methods='ori', in_file='source.val.tok', 
                           out_file='target.gpt.', max_len_limit=100)
#    simple_finetune_debug(domain='biased', methods='ori')
#    simple_finetune(domain='fr', methods='ori')
#    run_simple_finetune_and_emsemble_decoding('fr')
#    run_simple_finetune_and_emsemble_decoding('em')
#    run_concat_finetune('fr')
#    run_concat_finetune('em')
#    run_ha('fr')
#    run_ha('em')
#    domain_combined('fr',only_test=False)
#    domain_combined('em',only_test=True)

if __name__=='__main__':
    p = argparse.ArgumentParser(description='Hyperparams')
    p.add_argument('-d', '--domain', type=str, default="tw_04")
    args = p.parse_args()
    run_all(args)


<filename>main.py
import os
import argparse
from gpt.src.concat_fine_tuning import concat_finetuning, domain_combined
from gpt.src.hierarchical_attention import HA
from gpt.src.simple_finetune import simple_finetune, ensemble_test, simple_finetune_output


def run_simple_finetune_and_emsemble_decoding(domain):
    simple_finetune(domain=domain, methods='ori')
    simple_finetune(domain=domain, methods='rule')
    ensemble_test(domain=domain)


def run_concat_finetune(domain):
    concat_finetuning(domain=domain)

def run_ha(domain):
    HA(domain=domain)

def run_all(args):
#    simple_finetune(domain=args.domain, methods='ori',
#                    source='source',target='target')
    simple_finetune_output(in_domain=args.domain, out_domain=args.domain, 
                           methods='ori', in_file='source.val.tok', 
                           out_file='target.gpt.', max_len_limit=100)
#    simple_finetune_debug(domain='biased', methods='ori')
#    simple_finetune(domain='fr', methods='ori')
#    run_simple_finetune_and_emsemble_decoding('fr')
#    run_simple_finetune_and_emsemble_decoding('em')
#    run_concat_finetune('fr')
#    run_concat_finetune('em')
#    run_ha('fr')
#    run_ha('em')
#    domain_combined('fr',only_test=False)
#    domain_combined('em',only_test=True)

if __name__=='__main__':
    p = argparse.ArgumentParser(description='Hyperparams')
    p.add_argument('-d', '--domain', type=str, default="tw_04")
    args = p.parse_args()
    run_all(args)


#    simple_finetune(domain=args.domain, methods='ori', #                    source='source',target='target') #    simple_finetune_debug(domain='biased', methods='ori') #    simple_finetune(domain='fr', methods='ori') #    run_simple_finetune_and_emsemble_decoding('fr') #    run_simple_finetune_and_emsemble_decoding('em') #    run_concat_finetune('fr') #    run_concat_finetune('em') #    run_ha('fr') #    run_ha('em') #    domain_combined('fr',only_test=False) #    domain_combined('em',only_test=True)