Skip to content

Commit

Permalink
tokenizing dataset pbar now displays out_dir name
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Dec 19, 2022
1 parent 4b82548 commit b3b0cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miditok/midi_tokenizer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ def tokenize_midi_dataset(self, midi_paths: Union[List[str], List[Path], List[Pu
out_dir.mkdir(parents=True, exist_ok=True)
self.save_params(out_dir / 'config.txt') # Saves the parameters with which the MIDIs are converted

for midi_path in tqdm(midi_paths, desc='Converting MIDIs to tokens') if logging else enumerate(midi_paths):
# Some MIDIs can contains errors that are raised by Mido, if so the loop continues
for midi_path in tqdm(midi_paths, desc=f'Tokenizing MIDIs ({out_dir.name})') if logging else midi_paths:
# Some MIDIs can contain errors that are raised by Mido, if so the loop continues
try:
midi = MidiFile(PurePath(midi_path))
except FileNotFoundError:
Expand Down

0 comments on commit b3b0cc7

Please sign in to comment.