boris commited on
Commit
3e6ab1f
1 Parent(s): 90320ea

feat: use str mode for json

Browse files
Files changed (1) hide show
  1. seq2seq/run_seq2seq_flax.py +1 -1
seq2seq/run_seq2seq_flax.py CHANGED
@@ -794,7 +794,7 @@ def main():
794
  state = unreplicate(state)
795
  with (Path(training_args.output_dir) / 'opt_state.msgpack').open('wb') as f:
796
  f.write(to_bytes(state.opt_state))
797
- with (Path(training_args.output_dir) / 'training_state.json').open('wb') as f:
798
  json.dump({'step': state.step.item()}, f)
799
 
800
  # save to W&B
 
794
  state = unreplicate(state)
795
  with (Path(training_args.output_dir) / 'opt_state.msgpack').open('wb') as f:
796
  f.write(to_bytes(state.opt_state))
797
+ with (Path(training_args.output_dir) / 'training_state.json').open('w') as f:
798
  json.dump({'step': state.step.item()}, f)
799
 
800
  # save to W&B