diff --git a/benchmark/datasets.py b/benchmark/datasets.py index 76e7efdb..fe59e08b 100644 --- a/benchmark/datasets.py +++ b/benchmark/datasets.py @@ -153,6 +153,9 @@ def prepare(self, skip_data=False, original_size=10**9): fn = self.ds_fn sourceurl = os.path.join(self.base_url, fn) outfile = os.path.join(self.basedir, fn) + if self.nb != original_size: + outfile = outfile + '.crop_nb_%d' % self.nb + if os.path.exists(outfile): print("file %s already exists" % outfile) return @@ -164,7 +167,6 @@ def prepare(self, skip_data=False, original_size=10**9): else: # download cropped version of file file_size = 8 + self.d * self.nb * np.dtype(self.dtype).itemsize - outfile = outfile + '.crop_nb_%d' % self.nb if os.path.exists(outfile): print("file %s already exists" % outfile) return