mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
[Flax] Fix cur step flax examples (#12608)
* fix_torch_device_generate_test * remove @ * fix save problem
This commit is contained in:
parent
65e27215ba
commit
deecdd4939
@ -622,7 +622,6 @@ def main():
|
||||
|
||||
# Save metrics
|
||||
if has_tensorboard and jax.process_index() == 0:
|
||||
cur_step = epoch * (len(train_dataset) // train_batch_size)
|
||||
write_eval_metric(summary_writer, eval_metrics, cur_step)
|
||||
|
||||
if cur_step % training_args.save_steps == 0 and cur_step > 0:
|
||||
|
@ -663,7 +663,6 @@ if __name__ == "__main__":
|
||||
|
||||
# Save metrics
|
||||
if has_tensorboard and jax.process_index() == 0:
|
||||
cur_step = epoch * (len(tokenized_datasets["train"]) // train_batch_size)
|
||||
write_eval_metric(summary_writer, eval_metrics, cur_step)
|
||||
|
||||
if cur_step % training_args.save_steps == 0 and cur_step > 0:
|
||||
|
@ -771,7 +771,6 @@ if __name__ == "__main__":
|
||||
|
||||
# Save metrics
|
||||
if has_tensorboard and jax.process_index() == 0:
|
||||
cur_step = epoch * (len(tokenized_datasets["train"]) // train_batch_size)
|
||||
write_eval_metric(summary_writer, eval_metrics, cur_step)
|
||||
|
||||
if cur_step % training_args.save_steps == 0 and cur_step > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user