hagabbar/vitamin_c

test set files with .resume in filename

Closed this issue · 0 comments

Describe the bug
Any files other than .h5py files in the test set posterior directory will crash the program.

Will need to either automatically delete those files (easiest) or ignore them somehow.
To Reproduce

ValueError Traceback (most recent call last)
in ()
----> 1 run_vitamin.train(params='params_files_1kHz/params.txt',bounds='params_files_1kHz/bounds.txt',fixed_vals='params_files_1kHz/fixed_vals.txt')

/home/hunter.gabbard/CBC/public_VItamin/provided_models/myenv/lib/python3.6/site-packages/vitamin_b/run_vitamin.py in train(params, bounds, fixed_vals, resume_training)
624 dataLocations = ["%s" % input_dir]
625
--> 626 filenames = sorted(os.listdir(dataLocations[0]), key=lambda x: int(x.split('.')[0].split('_')[-1]))
627 if len(filenames) < num_finished_post:
628 sampler_loc = i + str(j+1)

/home/hunter.gabbard/CBC/public_VItamin/provided_models/myenv/lib/python3.6/site-packages/vitamin_b/run_vitamin.py in (x) 624 dataLocations = ["%s" % input_dir]
625
--> 626 filenames = sorted(os.listdir(dataLocations[0]), key=lambda x: int(x.split('.')[0].split('_')[-1]))
627 if len(filenames) < num_finished_post:
628 sampler_loc = i + str(j+1)

ValueError: invalid literal for int() with base 10: 'resume'