Skip to content

Commit

Permalink
fix bpe files_lim sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Nov 23, 2022
1 parent f92f4aa commit 2724062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miditok/bpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def bpe(self, tokens_path: Union[Path, PurePath, str], vocab_size: int, out_dir:
out_dir.mkdir(parents=True, exist_ok=True)
files_paths = list(Path(tokens_path).glob('**/*.json'))
files_paths_bpe = choices(files_paths, k=files_lim) if \
(files_lim is not None and files_lim > len(files_paths)) else files_paths
(files_lim is not None and files_lim < len(files_paths)) else files_paths
samples = []
samples_paths = []
original_lengths = []
Expand Down

0 comments on commit 2724062

Please sign in to comment.