Skip to content

Commit

Permalink
added in database memory for audio files
Browse files Browse the repository at this point in the history
This speeds up multi-model training serially by allowing for preservation of prior featurizations.
  • Loading branch information
jim-schwoebel committed Aug 14, 2020
1 parent d7d423f commit 5c95a3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions features/csv_features/featurize_csv_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def element_featurize(sampletype, default_features, filepaths, directory):
os.mkdir(basedir+'/train_dir/'+folder)
for i in range(len(filepaths)):
shutil.copy(filepaths[i], directory+'/'+filepaths[i].split('/')[-1])
try:
shutil.copy(filepaths[i][0:-4]+'.json', directory+'/'+filepaths[i].split('/')[-1][0:-4]+'.json')
except:
# pass over json files if they exist to speed up featurizations
pass

# featurize the files in the folder
os.chdir(basedir+'/features/%s_features/'%(sampletype))
Expand Down

0 comments on commit 5c95a3c

Please sign in to comment.