Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Nov 9, 2023
1 parent 8241e73 commit 39383f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
11 changes: 5 additions & 6 deletions torch_geometric/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class Dataset(torch.utils.data.Dataset, ABC):
included in the final dataset. (default: :obj:`None`)
log (bool, optional): Whether to print any console output while
downloading and processing the dataset. (default: :obj:`True`)
force_reload (bool, optional): Whether to re-process and reload
the dataset. (default: :obj:`False`)
force_reload (bool, optional): Whether to re-process the dataset.
(default: :obj:`False`)
"""
@property
def raw_file_names(self) -> Union[str, List[str], Tuple]:
Expand Down Expand Up @@ -224,18 +224,17 @@ def _process(self):
"The `pre_transform` argument differs from the one used in "
"the pre-processed version of this dataset. If you want to "
"make use of another pre-processing technique, pass "
"'force_reload=True' explicitly to reload the dataset.")
"`force_reload=True` explicitly to reload the dataset.")

f = osp.join(self.processed_dir, 'pre_filter.pt')
if osp.exists(f) and torch.load(f) != _repr(self.pre_filter):
warnings.warn(
"The `pre_filter` argument differs from the one used in "
"the pre-processed version of this dataset. If you want to "
"make use of another pre-fitering technique, pass "
"'force_reload=True' explicitly to reload the dataset.")
"`force_reload=True` explicitly to reload the dataset.")

if not self.force_reload and files_exist(
self.processed_paths): # pragma: no cover
if not self.force_reload and files_exist(self.processed_paths):
return

if self.log and 'pytest' not in sys.modules:
Expand Down
4 changes: 2 additions & 2 deletions torch_geometric/data/in_memory_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class InMemoryDataset(Dataset, ABC):
included in the final dataset. (default: :obj:`None`)
log (bool, optional): Whether to print any console output while
downloading and processing the dataset. (default: :obj:`True`)
force_reload (bool, optional): Whether to re-process and reload
the dataset. (default: :obj:`False`)
force_reload (bool, optional): Whether to re-process the dataset.
(default: :obj:`False`)
"""
@property
def raw_file_names(self) -> Union[str, List[str], Tuple]:
Expand Down
4 changes: 2 additions & 2 deletions torch_geometric/datasets/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class Actor(InMemoryDataset):
an :obj:`torch_geometric.data.Data` object and returns a
transformed version. The data object will be transformed before
being saved to disk. (default: :obj:`None`)
force_reload (bool, optional): Whether to re-process and reload
the dataset. (default: :obj:`False`)
force_reload (bool, optional): Whether to re-process the dataset.
(default: :obj:`False`)
**STATS:**
Expand Down

0 comments on commit 39383f7

Please sign in to comment.