if len(new_test_frame) > 0:
test_frame = test_frame.append(new_test_frame)
else:
raise Exception("Test frame has length 0. Adjust prediction date.")
// write out the training and test files
write_frame(train_frame, directory, train_file, extension, separator)
write_frame(test_frame, directory, test_file, extension, separator)
// run the model pipeline
After Change
else:
raise Exception("A test frame has zero rows. Adjust prediction date.")
else:
logger.warning("A training frame has zero rows.")
// write out the training and test files
write_frame(train_frame, directory, train_file, extension, separator)
write_frame(test_frame, directory, test_file, extension, separator)
// run the model pipeline