Commit Graph
37 Commits
Author SHA1 Message Date
samuelbroscheit 94247ad6cb Make num_train_optimization_steps int 2019-05-13 12:38:22 +02:00
samuel.broscheit 49a77ac16f Clean up a little bit 2019-05-12 00:31:10 +02:00
samuel.broscheit 3bf3f9596f Fixing the issues reported in https://github.com/huggingface/pytorch-pretrained-BERT/issues/556
Reason for issue was that optimzation steps where computed from example size, which is different from actual size of dataloader when an example is chunked into multiple instances.

Solution in this pull request is to compute num_optimization_steps directly from len(data_loader).
2019-05-12 00:13:45 +02:00
burcturkoglu 00c7fd2b79 Division to num_train_optimizer of global_step in lr_this_step is removed. 2019-05-09 10:57:03 +03:00
burcturkoglu fa37b4da77 Merge branch 'master' of https://github.com/huggingface/pytorch-pretrained-BERT 2019-05-09 10:55:24 +03:00
burcturkoglu 5289b4b9e0 Division to num_train_optimizer of global_step in lr_this_step is removed. 2019-05-09 10:51:38 +03:00
MottoX 74dbba64bc Prepare optimizer only when args.do_train is True 2019-05-02 19:09:29 +08:00
Thomas Wolf 2dee86319d Merge pull request #527 from Mathieu-Prouveur/fix_value_training_loss
Update example files so that tr_loss is not affected by args.gradient…
2019-04-30 11:12:55 +02:00
Mathieu Prouveur 87b9ec3843 Fix tr_loss rescaling factor using global_step 2019-04-29 12:58:29 +02:00
Mathieu Prouveur ed8fad7390 Update example files so that tr_loss is not affected by args.gradient_accumulation_step 2019-04-24 14:07:00 +02:00
thomwolf d94c6b0144 fix training schedules in examples to match new API 2019-04-23 11:17:06 +02:00
thomwolf 60ea6c59d2 added best practices for serialization in README and examples 2019-04-15 15:00:33 +02:00
thomwolf 179a2c2ff6 update example to work with new serialization semantic 2019-04-15 14:33:23 +02:00
Yuqiang Xie 77944d1b31 add tqdm to the process of eval
Maybe better.
2019-03-21 20:59:33 +08:00
tseretelitornike 83857ffeaa Added missing imports. 2019-03-15 12:45:48 +01:00
thomwolf 994d86609b fixing PYTORCH_PRETRAINED_BERT_CACHE use in examples 2019-03-06 10:21:24 +01:00
thomwolf 5c85fc3977 fix typo - logger info 2019-03-06 10:05:21 +01:00
thomwolf eebc8abbe2 clarify and unify model saving logic in examples 2019-02-11 14:04:19 +01:00
Thomas Wolf 848aae49e1 Merge branch 'master' into python_2 2019-02-06 00:13:20 +01:00
thomwolf 448937c00d python 2 compatibility 2019-02-06 00:07:46 +01:00
thomwolf 1579c53635 more explicit notation: num_train_step => num_train_optimization_steps 2019-02-05 15:36:33 +01:00
Matej Svejda 5169069997 make examples consistent, revert error in num_train_steps calculation 2019-01-30 11:47:25 +01:00
Matej Svejda 9c6a48c8c3 fix learning rate/fp16 and warmup problem for all examples 2019-01-27 14:07:24 +01:00
thomwolf c9fd350567 remove default when action is store_true in arguments 2019-01-07 13:01:54 +01:00
Grégory Châtel 186f75342e Adding new pretrained model to the help of the bert_model argument. 2019-01-02 14:00:59 +01:00
thomwolf ae88eb88a4 set encoding to 'utf-8' in calls to open 2018-12-14 13:48:58 +01:00
thomwolf e1eab59aac no fp16 on evaluation 2018-12-13 14:54:02 +01:00
thomwolf 087798b7fa fix reloading model for evaluation in examples 2018-12-13 14:48:12 +01:00
thomwolf 0f544625f4 fix swag example for work with apex 2018-12-13 13:35:59 +01:00
Grégory Châtel df34f22854 Removing the dependency to pandas and using the csv module to load data. 2018-12-10 17:45:23 +01:00
Grégory Châtel d429c15f25 Removing old code from copy-paste. 2018-12-06 19:19:21 +01:00
Grégory Châtel 63c45056aa Finishing the code for the Swag task. 2018-12-06 18:53:05 +01:00
Grégory Châtel c45d8ac554 Storing the feature of each choice as a dict for readability. 2018-12-06 16:01:28 +01:00
Grégory Châtel 0812aee2c3 Fixing problems in convert_examples_to_features. 2018-12-06 15:53:07 +01:00
Grégory Châtel f2b873e995 convert_examples_to_features code and small improvements. 2018-12-06 15:40:47 +01:00
Grégory Châtel 83fdbd6043 Adding read_swag_examples to load the dataset. 2018-12-06 14:02:46 +01:00
Grégory Châtel 7183cded4e SwagExample class. 2018-12-06 13:39:44 +01:00