Skip to content

Conversation

@pmeier
Copy link
Contributor

@pmeier pmeier commented Feb 25, 2021

Follow-up from and blocked by #3454 (comment).

@pmeier
Copy link
Contributor Author

pmeier commented Mar 1, 2021

This only came up, because the tests are generating a lot of these cache files. If you think this should stay the way it is we can simply remove them afterwards:

@contextlib.contextmanager
def create_dataset(
self,
*args, **kwargs
):
with super().create_dataset(*args, **kwargs) as output:
yield output
# Currently datasets.LSUN caches the keys in the current directory rather than in the root directory. Thus,
# this creates a number of unique _cache_* files in the current directory that will not be removed together
# with the temporary directory
for file in os.listdir(os.getcwd()):
if file.startswith("_cache_"):
os.remove(file)

Thus, I'm closing this. Feel free to re-open in case we want to change the caching.

@pmeier pmeier closed this Mar 1, 2021
@pmeier pmeier deleted the fix-lsun-cache branch October 18, 2021 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants