CommonParams( dataset_name="duee1.0", experiment_name="commodity_ner", train_file=train_text_file, eval_file=train_bio_file, #test_file=test_file, learning_rate=2e-5, train_max_seq_length=512, eval_max_seq_length=512, per_gpu_train_batch_size=4, per_gpu_eval_batch_size=4, per_gpu_predict_batch_size=4, #per_gpu_train_batch_size=16, #per_gpu_eval_batch_size=16, #per_gpu_predict_batch_size=16, seg_len=510, seg_backoff=128, num_train_epochs=10, fold=0, #num_augements=3, enable_kd=False, enable_sda=False, sda_teachers=2, loss_type="CrossEntropyLoss", # loss_type='FocalLoss', focalloss_gamma=2.0, model_type="bert", model_path= # "/opt/share/pretrained/pytorch/hfl/chinese-electra-large-discriminator", r"E:\ai_contest\ccks\mytheta\myRepo\theta-master-0826\theta\examples\LIC2021\model_rbt3", # "/opt/share/pretrained/pytorch/bert-base-chinese", fp16=False, best_index="f1", random_type="np"),
CommonParams( dataset_name="xfyun", experiment_name="xfyun_ner", train_file=train_file, eval_file=None, test_file=test_file, #test_spo_file, learning_rate=2e-5, train_max_seq_length=256, eval_max_seq_length=256, per_gpu_train_batch_size=16, per_gpu_eval_batch_size=16, per_gpu_predict_batch_size=16, #per_gpu_train_batch_size=16, #per_gpu_eval_batch_size=16, #per_gpu_predict_batch_size=16, seg_len=510, seg_backoff=128, num_train_epochs=10, fold=0, num_augements=0, enable_kd=False, enable_sda=False, sda_teachers=2, loss_type="CrossEntropyLoss", # loss_type='FocalLoss', focalloss_gamma=2.0, model_type="bert", model_path= # "/opt/share/pretrained/pytorch/hfl/chinese-electra-large-discriminator", #r"/opt/kelvin/python/knowledge_graph/theta/theta-master-0826/theta/examples/LIC2021/model_rbt3", r"/kaggle/working", fp16=False, best_index="f1", random_type="np"),
CommonParams( dataset_name="event_element", experiment_name="ccks2020_event_element", train_file="data/event_element_train_data_label.txt", eval_file="data/event_element_train_data_label.txt", test_file="data/event_element_dev_data.txt", learning_rate=2e-5, train_max_seq_length=512, eval_max_seq_length=512, per_gpu_train_batch_size=4, per_gpu_eval_batch_size=4, per_gpu_predict_batch_size=4, seg_len=510, seg_backoff=128, num_train_epochs=10, fold=0, num_augements=3, enable_kd=False, enable_sda=False, sda_teachers=2, loss_type="CrossEntropyLoss", # loss_type='FocalLoss', focalloss_gamma=2.0, model_type="bert", model_path= # "/opt/share/pretrained/pytorch/hfl/chinese-electra-large-discriminator", "/kaggle/working", # "/opt/share/pretrained/pytorch/bert-base-chinese", fp16=True, best_index="f1", random_type="np"),
experiment_params = GlueAppParams( CommonParams( dataset_name="o2o_reviews", experiment_name="o2o_reviews", train_file="data/train.csv", eval_file="data/train.csv", test_file="data/test_new.csv", learning_rate=1e-5, train_max_seq_length=256, eval_max_seq_length=256, per_gpu_train_batch_size=16, per_gpu_eval_batch_size=16, per_gpu_predict_batch_size=16, seg_len=0, seg_backoff=0, num_train_epochs=10, fold=0, num_augements=0, enable_kd=False, enable_sda=False, sda_teachers=1, loss_type="CrossEntropyLoss", model_type="bert", model_path="/opt/share/pretrained/pytorch/bert-base-chinese", train_rate=0.9, fp16=False, best_index='f1', ), GlueParams(glue_labels=glue_labels, )) experiment_params.debug()
CommonParams( dataset_name="event_classification", experiment_name="ccks2020_entity_element", train_file="data/event_element_train_data_label.txt", eval_file="data/event_element_train_data_label.txt", test_file="data/event_element_dev_data.txt", learning_rate=1e-5, train_max_seq_length=512, eval_max_seq_length=512, per_gpu_train_batch_size=4, per_gpu_eval_batch_size=4, per_gpu_predict_batch_size=4, seg_len=0, seg_backoff=0, num_train_epochs=10, fold=0, num_augements=0, enable_kd=False, enable_sda=False, sda_teachers=3, sda_stategy="clone_models", sda_empty_first=True, loss_type="CrossEntropyLoss", # loss_type="FocalLoss", focalloss_gamma=1.5, model_type="bert", model_path= "/opt/share/pretrained/pytorch/roberta-wwm-large-ext-chinese", train_rate=0.9, fp16=True, best_index='f1', ),
experiment_params = NerAppParams( CommonParams( dataset_name="medical_entity", experiment_name="ccks2020_medical_entity", train_file='data/rawdata/ccks2020_2_task1_train/task1_train.txt', eval_file='data/rawdata/ccks2020_2_task1_train/task1_train.txt', test_file='data/rawdata/ccks2_task1_val/task1_no_val_utf8.txt', learning_rate=2e-5, train_max_seq_length=512, eval_max_seq_length=512, per_gpu_train_batch_size=4, per_gpu_eval_batch_size=4, per_gpu_predict_batch_size=4, seg_len=510, seg_backoff=128, num_train_epochs=10, fold=1, num_augements=2, enable_kd=True, enable_sda=False, sda_teachers=2, loss_type="CrossEntropyLoss", model_type="bert", model_path= # "/opt/share/pretrained/pytorch/hfl/chinese-electra-large-discriminator", "/opt/share/pretrained/pytorch/roberta-wwm-large-ext-chinese", fp16=True, best_index="f1", seed=6636, random_type=None), NerParams(ner_labels=ner_labels, ner_type='span', no_crf_loss=False))
from theta.modeling import Params, CommonParams, NerParams, NerAppParams, log_global_params experiment_params = NerAppParams( CommonParams( dataset_name="medical_event", experiment_name="ccks2020_medical_event", tracking_uri="http://tracking.mlflow:5000", train_file='data/task2_train_reformat.tsv', eval_file='data/task2_train_reformat.tsv', test_file='data/task2_no_val.tsv', learning_rate=2e-5, train_max_seq_length=512, eval_max_seq_length=512, per_gpu_train_batch_size=4, per_gpu_eval_batch_size=4, per_gpu_predict_batch_size=4, seg_len=510, seg_backoff=128, num_train_epochs=10, fold=3, num_augements=2, enable_kd=True, loss_type="CrossEntropyLoss", model_type="bert", model_path= "/opt/share/pretrained/pytorch/roberta-wwm-large-ext-chinese", fp16=True, random_type='np', ), NerParams(ner_labels=ner_labels, ner_type='crf', no_crf_loss=True)) experiment_params.debug()
CommonParams( dataset_name="entity_typing", experiment_name="ccks2020_entity_typing", train_file="data/rawdata/ccks_7_1_competition_data/entity_type.txt", eval_file="data/rawdata/ccks_7_1_competition_data/entity_type.txt", test_file= "data/rawdata/ccks_7_1_competition_data/entity_validation.txt", learning_rate=1e-5, train_max_seq_length=32, eval_max_seq_length=32, per_gpu_train_batch_size=96, per_gpu_eval_batch_size=96, per_gpu_predict_batch_size=96, seg_len=0, seg_backoff=0, num_train_epochs=10, fold=8, num_augements=0, enable_kd=False, enable_sda=False, sda_teachers=3, sda_stategy="clone_models", sda_empty_first=True, # loss_type="CrossEntropyLoss", loss_type="FocalLoss", focalloss_gamma=2.0, model_type="bert", model_path= "/opt/share/pretrained/pytorch/roberta-wwm-large-ext-chinese", train_rate=0.9, fp16=False, best_index='f1', ),