def check_dataset(dirname, name):
''' Check the test and valid files are in the directory, as well as the solution'''
valid_file = os.path.join(dirname, name + '_valid.data')
if not os.path.isfile(valid_file):
print('No validation file for ' + name)
exit(1)
test_file = os.path.join(dirname, name + '_test.data')
if not os.path.isfile(test_file):
print('No test file for ' + name)
exit(1)
# Check the training labels are there
training_solution = os.path.join(dirname, name + '_train.solution')
if not os.path.isfile(training_solution):
print('No training labels for ' + name)
exit(1)
return True
评论列表
文章目录