[2021-05-15 01:29:17,840 INFO] Counter vocab from -1 samples.
[2021-05-15 01:29:17,840 INFO] n_sample=-1: Build vocab on full datasets.
[2021-05-15 01:29:17,845 INFO] corpus_1's transforms: TransformPipe()
[2021-05-15 01:29:17,846 INFO] Loading ParallelCorpus(../data/small/abstract_methods/train_buggy.txt, ../data/small/edit_ops/general/loose/train.txt, align=None)...
[2021-05-15 01:29:18,347 INFO] Counters src:429
[2021-05-15 01:29:18,347 INFO] Counters tgt:444
[2021-05-15 01:29:18,347 WARNING] path test_model_loose/save_data.vocab.src exists, may overwrite...
[2021-05-15 01:29:18,349 WARNING] path test_model_loose/save_data.vocab.tgt exists, may overwrite...
[2021-05-15 01:29:19,179 INFO] Parsed 2 corpora from -data.
[2021-05-15 01:29:19,179 INFO] Get special vocabs from Transforms: {'src': set(), 'tgt': set()}.
[2021-05-15 01:29:19,179 INFO] Loading vocab from text file...
[2021-05-15 01:29:19,179 INFO] Loading src vocabulary from test_model_loose/save_data.vocab.src
[2021-05-15 01:29:19,181 INFO] Loaded src vocab has 429 tokens.
[2021-05-15 01:29:19,182 INFO] Loading tgt vocabulary from test_model_loose/save_data.vocab.tgt
[2021-05-15 01:29:19,184 INFO] Loaded tgt vocab has 444 tokens.
[2021-05-15 01:29:19,184 INFO] Building fields with vocab in counters...
[2021-05-15 01:29:19,185 INFO] * tgt vocab size: 448.
[2021-05-15 01:29:19,185 INFO] * src vocab size: 431.
[2021-05-15 01:29:19,185 INFO] * src vocab size = 431
[2021-05-15 01:29:19,185 INFO] * tgt vocab size = 448
[2021-05-15 01:29:19,187 INFO] Building model...
[2021-05-15 01:29:31,740 INFO] NMTModel(
(encoder): RNNEncoder(
(embeddings): Embeddings(
(make_embedding): Sequential(
(emb_luts): Elementwise(
(0): Embedding(431, 512, padding_idx=1)
)
)
)
(rnn): LSTM(512, 256, num_layers=2, dropout=0.2)
)
(decoder): InputFeedRNNDecoder(
(embeddings): Embeddings(
(make_embedding): Sequential(
(emb_luts): Elementwise(
(0): Embedding(448, 512, padding_idx=1)
)
)
)
(dropout): Dropout(p=0.2, inplace=False)
(rnn): StackedLSTM(
(dropout): Dropout(p=0.2, inplace=False)
(layers): ModuleList(
(0): LSTMCell(768, 256)
(1): LSTMCell(256, 256)
)
)
(attn): GlobalAttention(
(linear_context): Linear(in_features=256, out_features=256, bias=False)
(linear_query): Linear(in_features=256, out_features=256, bias=True)
(v): Linear(in_features=256, out_features=1, bias=False)
(linear_out): Linear(in_features=512, out_features=256, bias=True)
)
)
(generator): Sequential(
(0): Linear(in_features=256, out_features=448, bias=True)
(1): Cast()
(2): LogSoftmax(dim=-1)
)
)
[2021-05-15 01:29:31,741 INFO] encoder: 1535488
[2021-05-15 01:29:31,741 INFO] decoder: 2184384
[2021-05-15 01:29:31,741 INFO] * number of parameters: 3719872
[2021-05-15 01:29:31,743 INFO] Starting training on GPU: [0]
[2021-05-15 01:29:31,743 INFO] Start training loop and validate every 100 steps...
[2021-05-15 01:29:31,744 INFO] corpus_1's transforms: TransformPipe()
[2021-05-15 01:29:31,745 INFO] Loading ParallelCorpus(../data/small/abstract_methods/train_buggy.txt, ../data/small/edit_ops/general/loose/train.txt, align=None)...
[2021-05-15 01:29:41,975 INFO] Step 50/ 500; acc: 18.38; ppl: 170.46; xent: 5.14; lr: 0.00010; 10041/3951 tok/s; 10 sec
[2021-05-15 01:29:51,557 INFO] Step 100/ 500; acc: 25.32; ppl: 35.93; xent: 3.58; lr: 0.00010; 10430/4158 tok/s; 20 sec
[2021-05-15 01:29:51,557 INFO] valid's transforms: TransformPipe()
[2021-05-15 01:29:51,559 INFO] Loading ParallelCorpus(../data/small/abstract_methods/valid_buggy.txt, ../data/small/edit_ops/general/loose/valid.txt, align=None)...
[2021-05-15 01:29:59,493 INFO] Validation perplexity: 26.3849
[2021-05-15 01:29:59,493 INFO] Validation accuracy: 28.6959
[2021-05-15 01:29:59,495 INFO] Saving checkpoint test_model_loose/model_step_100.pt
[2021-05-15 01:30:10,007 INFO] Step 150/ 500; acc: 30.41; ppl: 25.32; xent: 3.23; lr: 0.00010; 5468/2203 tok/s; 38 sec
[2021-05-15 01:30:19,192 INFO] Step 200/ 500; acc: 41.50; ppl: 16.08; xent: 2.78; lr: 0.00010; 11150/4410 tok/s; 47 sec
[2021-05-15 01:30:19,194 INFO] Loading ParallelCorpus(../data/small/abstract_methods/valid_buggy.txt, ../data/small/edit_ops/general/loose/valid.txt, align=None)...
[2021-05-15 01:30:27,140 INFO] Validation perplexity: 11.4145
[2021-05-15 01:30:27,140 INFO] Validation accuracy: 44.7773
[2021-05-15 01:30:27,142 INFO] Saving checkpoint test_model_loose/model_step_200.pt
[2021-05-15 01:30:37,243 INFO] Step 250/ 500; acc: 45.01; ppl: 11.18; xent: 2.41; lr: 0.00010; 5593/2228 tok/s; 65 sec
[2021-05-15 01:30:46,838 INFO] Step 300/ 500; acc: 45.41; ppl: 9.96; xent: 2.30; lr: 0.00010; 10616/4130 tok/s; 75 sec
[2021-05-15 01:30:46,839 INFO] Loading ParallelCorpus(../data/small/abstract_methods/valid_buggy.txt, ../data/small/edit_ops/general/loose/valid.txt, align=None)...
[2021-05-15 01:30:54,776 INFO] Validation perplexity: 8.9979
[2021-05-15 01:30:54,777 INFO] Validation accuracy: 46.2528
[2021-05-15 01:30:54,779 INFO] Saving checkpoint test_model_loose/model_step_300.pt
[2021-05-15 01:31:05,099 INFO] Step 350/ 500; acc: 46.06; ppl: 9.41; xent: 2.24; lr: 0.00010; 5678/2190 tok/s; 93 sec
[2021-05-15 01:31:15,092 INFO] Step 400/ 500; acc: 46.47; ppl: 9.05; xent: 2.20; lr: 0.00010; 10291/4053 tok/s; 103 sec
[2021-05-15 01:31:15,094 INFO] Loading ParallelCorpus(../data/small/abstract_methods/valid_buggy.txt, ../data/small/edit_ops/general/loose/valid.txt, align=None)...
[2021-05-15 01:31:23,041 INFO] Validation perplexity: 8.38134
[2021-05-15 01:31:23,041 INFO] Validation accuracy: 47.2777
[2021-05-15 01:31:23,043 INFO] Saving checkpoint test_model_loose/model_step_400.pt
[2021-05-15 01:31:33,206 INFO] Step 450/ 500; acc: 46.45; ppl: 8.88; xent: 2.18; lr: 0.00010; 5548/2213 tok/s; 121 sec
[2021-05-15 01:31:43,081 INFO] Step 500/ 500; acc: 47.22; ppl: 8.83; xent: 2.18; lr: 0.00010; 10405/4080 tok/s; 131 sec
[2021-05-15 01:31:43,082 INFO] Loading ParallelCorpus(../data/small/abstract_methods/valid_buggy.txt, ../data/small/edit_ops/general/loose/valid.txt, align=None)...
[2021-05-15 01:31:51,020 INFO] Validation perplexity: 8.06989
[2021-05-15 01:31:51,020 INFO] Validation accuracy: 48.0582
[2021-05-15 01:31:51,022 INFO] Saving checkpoint test_model_loose/model_step_500.pt