@@ -283,11 +283,10 @@ class LRUShards:
283283 stores the local names of the shards as keys and the downloaded paths as
284284 values. The shards are downloaded to a directory specified by dldir.
285285 The local name of a shard is computed by the localname function, which
286- takes the shard URL as an argument. If keep is True, the downloaded files
287- are not deleted when they are no longer needed.
286+ takes the shard URL as an argument.
288287 """
289288
290- def __init__ (self , lru_size , keep = False , localname = DefaultLocalname ()):
289+ def __init__ (self , lru_size , localname = DefaultLocalname ()):
291290 self .localname = localname
292291 # the cache contains the local name as the key and the downloaded path as the value
293292 self .lru = LRUCache (lru_size , release_handler = self .release_handler )
@@ -459,7 +458,8 @@ def __init__(
459458
460459 if lru_size > 200 :
461460 warnings .warn ("LRU size is very large; consider reducing it to avoid running out of file descriptors" )
462- self .cache = LRUShards (lru_size , localname = self .localname , keep = keep )
461+ # instantiate LRU cache of shards (keep flag removed)
462+ self .cache = LRUShards (lru_size , localname = self .localname )
463463
464464 def add_transform (self , transform ):
465465 """Add a transformation to the dataset."""
0 commit comments