tf.logging.fatal("Please specify data input keywords, this should "
"be a subset of SUPPORTED_INPUT provided "
"in application file.")
raise ValueError
filtered_names = [name for name in self.names
if vars(task_param).get(name, None)]
if not filtered_names:
tf.logging.fatal("Reader requires task input keywords %s, but "
After Change
elif isinstance(task_param, ParserNamespace):
task_param = vars(task_param)
try:
task_param = dict(task_param)
except ValueError:
tf.logging.fatal(
"To concatenate multiple input data arrays,\n"
"task_param should be a dictionary in the form:\n"
"{"new_modality_name": ["modality_1", "modality_2",...]}.")
raise
if file_list is None:
// defaulting to all files detected by the input specification
file_list = ImageSetsPartitioner().initialise(data_param).all_files
if not self.names:
// defaulting to load all sections defined in the task_param
self.names = list(task_param)
filtered_names = [name for name in self.names
if task_param.get(name, None)]
if not filtered_names:
tf.logging.fatal("Reader requires task input keywords %s, but "