<jupyter_start><jupyter_text>Model Training and Graph Plotting Train the models and plot the relevant metrics(loss/F1/accuracy/etc) with respect to epochs (Task 1)<jupyter_code>#Training the model in extractive setting
!python train.py -task ext -mode train -bert_data_path BERT_DATA_PATH -ext_dropout 0.1 -model_path MODEL_PATH -lr 2e-3 -visible_gpus 0 -report_every 50 -save_checkpoint_steps 1000 -batch_size 3000 -train_steps 50000 -accum_count 2 -log_file ../logs/ext_bert_cnndm -use_interval true -warmup_steps 10000 -max_pos 512
#Training the model in abstrative setting
python train.py  -task abs -mode train -bert_data_path BERT_DATA_PATH -dec_dropout 0.2  -model_path MODEL_PATH -sep_optim true -lr_bert 0.002 -lr_dec 0.2 -save_checkpoint_steps 2000 -batch_size 140 -train_steps 200000 -report_every 50 -accum_count 5 -use_bert_emb true -use_interval true -warmup_steps_bert 20000 -warmup_steps_dec 10000 -max_pos 512 -visible_gpus 0 -log_file ../logs/abs_bert_cnndm  -load_from_extractive EXT_CKPT

#EXT_PT corresponds to the saved checkpoint after training the model in extractive setting
#Generating graphs using Tensorboard 
!tensorboard --logdirs = <MODEL_PATH> 

#<MODEL_PATH> corresponds to the path of the trained model.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06629834254143646, 'fraction_numerical': 0.05445935280189424, 'mean_word_length': 5.246305418719212, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '124337', 'license': 'MIT', 'n_tokens_mistral': 488, 'n_tokens_neox': 412, 'n_words': 137, 'path': 'Model_Training_and_Graph_Plotting.ipynb', 'repo_name': 'AnushkaDayal/PreSumm_NNFL', 'size': '1267'}