Skip to content

Commit

Permalink
fix: re-adding kwargs when saving tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Aug 18, 2023
1 parent ca00539 commit 2e1978f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miditok/midi_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ def save_tokens(
kwargs["ids_bpe_encoded"] = ids_bpe_encoded

with open(path, "w") as outfile:
dic = {"ids": ids}
dic = {"ids": ids, **kwargs}
if programs is not None:
dic["programs"] = programs
json.dump(dic, outfile)
Expand Down

0 comments on commit 2e1978f

Please sign in to comment.