Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 27, 2020
1 parent 6f30bc5 commit 45233a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/base/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def __init__(self, root: str = PATH_DATASETS, train: bool = True,
raise RuntimeError('Dataset not found.')

data_file = self.TRAIN_FILE_NAME if self.train else self.TEST_FILE_NAME
# FIXME: try to fix loading
self.data, self.targets = _try_load(os.path.join(self.cached_folder_path, data_file))

def __getitem__(self, idx: int) -> Tuple[Tensor, int]:
Expand Down Expand Up @@ -107,6 +106,7 @@ def _download(self, data_folder: str) -> None:


def _try_load(path_data, trials: int = 30, delta: float = 1.):
"""Resolving loading from the same time from multiple concurrentprocesses."""
res, exp = None, None
assert trials, "at least some trial has to be set"
assert os.path.isfile(path_data), 'missing file: %s' % path_data
Expand Down

0 comments on commit 45233a5

Please sign in to comment.