From 6a2c29f59665ca83ccc866a9f868b228a06f6d40 Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 17 May 2022 15:39:07 -0600 Subject: [PATCH] Fix inverted logic --- codes/data/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/data/util.py b/codes/data/util.py index 03e6ad9c..b3ce32b5 100644 --- a/codes/data/util.py +++ b/codes/data/util.py @@ -597,7 +597,7 @@ def load_paths_from_cache(paths, cache_path, exclusion_list=[], endswith=None): print(f"Excluded {before-len(output)} files.") if endswith is not None: before = len(output) - output = list(filter(lambda p: not p.endswith(endswith), output)) + output = list(filter(lambda p: p.endswith(endswith), output)) print(f"Excluded {before-len(output)} files with endswith mask. For total of {len(output)} files") print("Done.") torch.save(output, cache_path)