Skip to content

Commit

Permalink
Specify path to bin files
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhangcs committed May 28, 2023
1 parent a93b996 commit 308a7bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion supar/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def evaluate(
self.transform.train()
logger.info("Loading the data")
if args.cache:
args.bin = os.path.join(os.path.dirname(args.path), 'bin')
args.bin = args.get('bin', os.path.join(os.path.dirname(args.path), 'bin'))
if is_dist():
batch_size = batch_size // dist.get_world_size()
data = Dataset(self.transform, **args)
Expand Down
2 changes: 1 addition & 1 deletion supar/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Dataset(torch.utils.data.Dataset):
binarize (bool):
If ``True``, binarizes the dataset once building it. Only works if ``cache=True``. Default: ``False``.
bin (str):
Path for saving binarized files, required if ``cache=True``. Default: ``None``.
Path to binarized files, required if ``cache=True``. Default: ``None``.
max_len (int):
Sentences exceeding the length will be discarded. Default: ``None``.
kwargs (Dict):
Expand Down

0 comments on commit 308a7bb

Please sign in to comment.