Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenWizard2015 committed Jun 28, 2024
1 parent 8a80ebb commit a6272ea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/create-test-dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from collections import defaultdict
import glob
import json
import shutil

BATCH_SIZE = 128 * 4
trainIndx = 0
Expand Down Expand Up @@ -105,10 +106,8 @@ def main(args):
with open(os.path.join(folder, 'stats.json'), 'r') as f:
stats = json.load(f)

# remove test-*.npz files from the test-main folder
for fname in glob.glob(os.path.join(args.output, 'test-*.npz')):
os.remove(fname)
continue
# remove all content from the output folder
shutil.rmtree(args.output, ignore_errors=True)
# recursively find the train file
trainFilename = glob.glob(os.path.join(folder, '**', 'test.npz'), recursive=True)
print('Found test files:', len(trainFilename))
Expand Down

0 comments on commit a6272ea

Please sign in to comment.