Spaces:
Running
Running
feat: use str mode for json
Browse files
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('
|
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
|