Added max_sample_ arguments (#10551)

* reverted changes of logging and saving metrics

* added max_sample arguments

* fixed code

* white space diff

* reformetting code

* reformatted code
This commit is contained in:
Bhadresh Savani
2021-03-09 00:27:10 +05:30
committed by GitHub
parent 917f104502
commit dfd16af832
14 changed files with 516 additions and 118 deletions

View File

@@ -601,7 +601,6 @@ def main():
trainer.save_state()
# Evaluation
results = {}
if training_args.do_eval:
logger.info("*** Evaluate ***")
@@ -614,6 +613,7 @@ def main():
trainer.log_metrics("eval", metrics)
trainer.save_metrics("eval", metrics)
# predict
if training_args.do_predict:
logger.info("*** Test ***")
@@ -640,8 +640,6 @@ def main():
with open(output_test_preds_file, "w") as writer:
writer.write("\n".join(test_preds))
return results
def _mp_fn(index):
# For xla_spawn (TPUs)